zoukankan      html  css  js  c++  java
  • 单击视图空白处隐藏IPhone键盘

    实现功能:隐藏iphone键盘

    主要操作步骤:

    1:添加一个button,不设置他的标题

    2:调整button的大小,使其填充区域整个试图区域

    3:设置btton的布局,使之停靠到所有其他的控件的底部,调整方式是:打开NIB文件,Layout菜单->SendToBack是该控件停靠所有底层

    4:打开属性设置器,打开他的Atrribute选项卡,设置他的type属性为Custom

    5:在后台写一个-(IBAction) HideKeyBord函数,然后将该函数关联到后台的触发事件

    6:后台处理代码

    -(IBAction)HideKeyBord:(id)sender

    {

        [textInput resignFirstResponder];// textInput为一个IBOutLet的 uitextLabel控件

    }

     

    8Run Application

     

     

    THE END !

    2011-07-06

     

     

  • 相关阅读:
    TCP拥塞控制算法 — CUBIC的补丁(二)
    TCP拥塞控制算法 — CUBIC的补丁(四)
    Class chart
    Class array
    Bool to int
    using in the function
    unsafe
    resources contain {0}
    Using Nullable Types
    Microsoft.Ink namespace
  • 原文地址:https://www.cnblogs.com/xingchen/p/2099404.html
Copyright © 2011-2022 走看看