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 

  • 相关阅读:
    POST GET原理函数
    位宽与带宽
    编程小工具
    C#的四个基本技巧
    关闭弹出模态窗口以后刷新父窗口
    十年技术,不要再迷茫
    冒泡排序
    单元测试工具及资源推荐
    xml xhtml html dhtml的区别
    删除List<string>中重复的值
  • 原文地址:https://www.cnblogs.com/yushunwu/p/2682724.html
Copyright © 2011-2022 走看看