Several different keyboard types |
Several different keyboards and input methods |
The keyboard cannot hide the portion of your view by default that is the focus of editing. In order to hide the keyboard, we need to write coding in .m file.
Usually, there are two common ways to hide keyboard:
1) When you click Return Button
-(IBAction)doneEditing:(id)sender{
[inputText resignFirstResponder];
}
|
2) When you click any part of view
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
//UITouch *touch = [touches anyObject];
[inputText resignFirstResponder];
}
|
For more details, please find the following official website from Apple Developer:
http://www.techotopia.com/index.php/Writing_iOS_5_Code_to_Hide_the_iPhone_Keyboard
No comments:
Post a Comment