ios 8 uitextfield keyboard not appearing
//发现在iphone 6 and iPhone plus 上面键盘不出来。后来查了下原来要在模拟器里设置下 var inputText = UITextField(frame: CGRectMake(0, 200, self.view.bounds.size.width, 30)) inputText.text = "" inputText.delegate = self backView.addSubview(inputText) func textFieldShouldReturn(textField: UITextField) -> Bool { textField .resignFirstResponder() var b :Bool return true }
- iOS Simulator -> Hardware -> Keyboard
- Uncheck "Connect Hardware Keyboard"
选择iOS Simulatro 按照上面的步骤操作