zoukankan      html  css  js  c++  java
  • fdfd

    And the Rest...

    general control attributes inherited from UIControl,but

    these generally don't apply to text fields,with the exception of

    the Enabled Checkbox,,won't affect the field's appearance.

    check Opaque,


    Set the Attributes for the Second Text field

    single -click the second text field in the View window, and return to the inspector.

    in the Placeholder field,type Type in a number.

    in the section called Text Input Traits

    keyboard Type pop-up menu. ince we want the user to enter numrs only.

    go ahead and select Number Pad

    we don't have to set the Return Key value for the numbeic

    keypad

    Connection Outlets

    Control-drap from File's Owner to each of the text field.

    and connect them to their corresponding outlets.

    Save the nib file once you;ve connected both text fields to their corresponding outlets and the go back

    to Xcode

    Closing the Keyboard

    how do you get the keyboard to go away?

    Go ahead and try.

    Closing the keyboard when done is Tapped

    the keyboard is software-based, we need to take a few extra steps to make sure the keyboard

    goes away when the user is finsihed with it .

    when the user taps the Done button on the text keyboard.

    a Did End On Exit event will be generated, and at that time , we need to tell the text field to tive up control so that the key board

    will go away.

    add an action method to our controller class.

    Control_FunViewController.h

    switch over to .m, we'll implement this method.


    add the following method to .m

    the first responder is the control with which the user is

    currently interacting. In our new method ,we tell our control to resign

    as a first responder, giving up that role to the previous control the user worked with.

    When a text field yields first responder status , the

    keyboard associated with it goes away.

    Double-click .xid to hop back ouer to IB and trigger this action from both of our tet field

    single click the Name text field , press 2 to bring the connecton in

    inspector  we want Did End On Exit since that is the event that will file when the uer taps the Done button on th ekeyboad

  • 相关阅读:
    eclipse的web项目热部署
    JAVA字符串转日期或日期转字符串
    右下角弹出框
    div拖拽
    js的富文本框与日期插件
    slected多选框的转移
    判断当前日期是否是当月数据
    java常见面试题(二)
    静态代理和动态代理
    java常见面试题(一)
  • 原文地址:https://www.cnblogs.com/yushunwu/p/2686582.html
Copyright © 2011-2022 走看看