【问题标题】:How to change the keyboard type for a text field in Xcode如何在 Xcode 中更改文本字段的键盘类型
【发布时间】:2011-04-16 23:22:42
【问题描述】:

我在 XCode 中创建了一个文本字段,而不是在 Interface Builder 中。在 IB 中,您可以选择不同的键盘类型。如何在 XCode 中做同样的事情?

【问题讨论】:

    标签: objective-c cocoa-touch interface-builder uitextfield xcode4


    【解决方案1】:

    1) 在 xib 中,您可以通过单击下面的键盘类型来更改

    2) 可以通过编程方式设置 textField.keyboardType = UIKeyboardTypeNumbersAndPunctuation;

    【讨论】:

      【解决方案2】:

      keyboardType 属性怎么样?

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2017-10-02
        • 2014-08-06
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-09-09
        相关资源
        最近更新 更多