How to dismiss number pad keyboard by tapping anywhere

后端 未结 15 2168
梦如初夏
梦如初夏 2020-12-04 17:53

I\'d like to know the simplest code to dismiss the number pad keyboard when tapping anywhere outside the number pad. It\'s a simple application to input a number inside a te

15条回答
  •  伪装坚强ぢ
    2020-12-04 18:10

    For Swift Use Below Code

    override func touchesBegan(touches: NSSet, withEvent event: UIEvent)
     {
           textFiled.resignFirstResponder()
     }
    

    Check out latest update on following Link

提交回复
热议问题