본문 바로가기
#모바일 [Mobile]/iOS

[iOS] 화면 터치를 통한 Keyboard 내리기 (Close iOS Keyboard by touching anywhere using Swift)

by cy_mos 2019. 6. 28.
반응형
화면 터치를 통한 Keyboard 내리기 (Close iOS Keyboard by touching anywhere using Swift)

📄 Close iOS Keyboard by touching anywhere using Source Code by Swift

// MARK: - Event Methods
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
       self.view.endEditing(true)
}

🚀 REFERENCE

 

Close iOS Keyboard by touching anywhere using Swift

I have been looking all over for this but I can't seem to find it. I know how to dismiss the keyboard using Objective-C but I have no idea how to do that using Swift? Does anyone know?

stackoverflow.com

 

반응형

댓글