// uitextfield
@IBOutlet var userID: UITextField!
userID.resignFirstResponder()//resign keyboard focus
// global
UIApplication.shared.sendAction(#selector(UIApplication.resignFirstResponder), to: nil, from: nil, for: nil);
'iOS Swift' 카테고리의 다른 글
swift3 add touch event to uitextfield editingDidBegin/editingDidEnd (0) | 2017.01.02 |
---|---|
swift3 save image to UserDefaults (0) | 2017.01.02 |
Swift3 UITextField border bottom (0) | 2016.12.31 |
swift3 : change button background color 버튼 배경색 변경하기 hex to UIColor (0) | 2016.12.13 |
swift3 textFieldDidChange 텍스트필드 이벤트 감지 (0) | 2016.12.13 |