Sportica   Sportica

iOS 8 swift 键盘不出来 ios 8 uitextfield keyboard not appearing

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
    }

 

 

  1. iOS Simulator -> Hardware -> Keyboard
  2. Uncheck "Connect Hardware Keyboard"

选择iOS Simulatro 按照上面的步骤操作

posted @ 2014-09-29 16:27  qingjoin  阅读(1172)  评论(0编辑  收藏  举报
  Sportica