If you want to hide the keyboard when you tap a button and you have more than one UITextFields
in your view
, then you should use:
[self.view endEditing:YES];
Tap anywhere on the view, and the keyboard will disappear.
More Related Contents:
- How can I programmatically check whether a keyboard is present in iOS app?
- can’t get correct value of keyboard height in iOS8
- Dismissing the keyboard in a UIScrollView
- How to reliably detect if an external keyboard is connected on iOS 9?
- How to mimic Keyboard animation on iOS 7 to add “Done” button to numeric keyboard?
- Sort An Array in Objective C with Multiple Items [closed]
- Posting On facebook friends wall [closed]
- Setting a button’s target/action and passing a particular string to the action [closed]
- How to link to apps on the app store
- How to programmatically send SMS on the iPhone?
- Assertion failure in dequeueReusableCellWithIdentifier:forIndexPath:
- Placeholder in UITextView
- @property retain, assign, copy, nonatomic in Objective-C
- Xcode 6: Keyboard does not show up in simulator
- Looping a video with AVFoundation AVPlayer?
- What is NSZombie?
- modal View controllers – how to display and dismiss
- iOS: Modal ViewController with transparent background
- UIButton Long Press Event
- How can you rotate text for UIButton and UILabel in Objective-C?
- distanceFromLocation – Calculate distance between two points
- How to turn the iPhone camera flash on/off?
- Centering subview’s X in autolayout throws “not prepared for the constraint”
- Centering MKMapView on spot N-pixels below pin
- iOS temporary folder location
- How can I delay a method call for 1 second?
- Center NSTextAttachment image next to single line UILabel
- Setting scroll position in UITableView
- How to handle push notifications if the application is already running?
- difference between presentViewController and UINavigationController?