2010-02-21 28 views

Trả lời

17

Bạn cần phải đặt keyboardType tài sản để UIKeyboardTypeNumberPad.

9
textField.keyboardType = UIKeyboardTypeNumberPad; 
3

Bạn cũng có thể dễ dàng làm được điều này trong file XIB

enter image description here

2

Swift:

textField.keyboardType = .numberPad 
Các vấn đề liên quan