5 假設myTextField是IBOutlet在你的控制器,你可以在你的viewDidLoad方法做到這一點: self.myTextField.keyboardType = UIKeyboardTypeDecimalPad; 來源 2012-08-01 09:29:26 Alladinian