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 

  • 相关阅读:
    c#的Marshal
    爬虫之requests详解
    爬取抖音视频
    爬取拉钩网
    爬虫自动登陆GitHub
    爬取博客园博客
    爬取煎蛋网文章
    爬取抽屉热搜榜文章
    准备
    爬虫示例
  • 原文地址:https://www.cnblogs.com/yushunwu/p/2682724.html
Copyright © 2011-2022 走看看