Dismiss The Keyboard - Multiple UITextFields in iOS 7

前端 未结 8 1150
盖世英雄少女心
盖世英雄少女心 2021-01-31 22:56

below you\'ll find my .h & .m files for my primary viewcontroller.

I have 3 questions.

1.) Because I have multiple uitextfields, do I have to set each with

8条回答
  •  孤街浪徒
    2021-01-31 23:18

    In swift 3 :

     //Dismiss keyboard , When touch outside
     override func touchesBegan(_ touches: Set, with event: UIEvent?)
        {
            self.view.endEditing(true)
        }
    

提交回复
热议问题