I set the delegate of the UITextField
to my ViewController
class.
In that class I implemented this method as following:
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[textField resignFirstResponder];
return NO;
}
More Related Contents:
- Allow only Numbers for UITextField input
- Blank space at top of UITextView in iOS 10
- How to add a ‘Done’ button to numpad keyboard in iOS
- Programmatically retrieve memory usage on iPhone
- Change User Agent in UIWebView
- Detect backspace in empty UITextField
- Move textfield when keyboard appears swift
- Creating a left-arrow button (like UINavigationBar’s “back” style) on a UIToolbar
- How to save picture to iPhone photo library?
- Set the maximum character length of a UITextField
- iPhone Keyboard Covers UITextField
- Measuring cellular signal strength
- How to customize the background color of a UITableViewCell?
- How to load local html file into UIWebView
- How can I scan barcodes on iOS? [closed]
- How to disable copy paste option from UITextField programmatically
- Create space at the beginning of a UITextField
- Adding the “Clear” Button to an iPhone UITextField
- Testing CoreLocation on iPhone Simulator
- How can I click a button behind a transparent UIView?
- How to read data structure from .plist file into NSArray
- Is it possible to disable floating headers in UITableView with UITableViewStylePlain?
- Add lefthand margin to UITextField
- How to draw border around a UILabel?
- Show iPhone cut copy paste menu on UILabel
- How do I delete all objects from my persistent store in Core Data?
- Navigation bar show/hide
- UIKeyboardBoundsUserInfoKey is deprecated, what to use instead?
- Refresh UIPageViewController – reorder pages and add new pages
- Core Bluetooth advertise and scan in the background