Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想以编程方式为 UITextField 显示十进制键盘。
假设这myTextField是IBOutlet在您的控制器中,您可以在您的viewDidLoad方法中执行此操作:
myTextField
IBOutlet
viewDidLoad
self.myTextField.keyboardType = UIKeyboardTypeDecimalPad;