zoukankan      html  css  js  c++  java
  • Touching the Background to close the Keyboard

    Can you recall that Apple's IOS applictions do in this situation?

    cause the keyboard to go away.

    our view controller has a property called view that it inherited from 

    UIViewController. this view corresponds to the View icon in the nib file

    this property points to an instance of UIView in the nib that acts as a container for all the items in our user interface

    has no appearance but it covers the entire iphone window.

    container view  to simply hold other views and controls.

    is the background of our user interface.

    change the class of the object that view points to so that its underlying classs is 

    UIControl instead of UIView.

    UIControl is a subclass of UIView.

    change the underlying classs of our nib's view.

    nib's main window in icon view mode, 

    single click the view icon and press c4 to bring up the identity inspector

    The field labeled Class currently says UIView

    change it to read UIControl.

    subclasses of UIControl.

    by changing the underlying class, we have just given this view

    the ability to trigger action methods.

    You can verify this by pressing c2 to bring up the connections inspector 

  • 相关阅读:
    VBScript的参数引用
    异常处理规范
    测试感悟
    URL重写
    避免重复记录
    EJB 异常处理探试法
    EJB 异常处理的最佳做法(1)
    使用vbscript脚本调用web服务
    用Dom4j解析XML及中文问题
    lucene简介
  • 原文地址:https://www.cnblogs.com/yushunwu/p/2682724.html
Copyright © 2011-2022 走看看