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 

  • 相关阅读:
    HDU-5514 Frogs 容斥
    2019ICPC EC-FINAL H-King 随机
    2019ICPC EC-FINAL E-Flow 贪心
    洛谷P4200 千山鸟飞绝 Splay
    CodeForces 1249F Maximum Weight Subset 树形dp
    HDU-5534 Partial Tree 完全背包优化
    【数论】Lucas定理
    [APIO2009]抢掠计划 解题报告
    tarjan(缩点)
    树状数组总结
  • 原文地址:https://www.cnblogs.com/yushunwu/p/2682724.html
Copyright © 2011-2022 走看看