问题
Is there a way to include a keyboard inside of a view? I want it to be part of the view and not be dismissed as well.
Birdfeedapp does this in it's 'add account' modal view.
回答1:
Simply just add this code to your view. This will show the keyboard:
-(void) viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
[YOURTEXTVIEW becomeFirstResponder];
}
回答2:
Either make a text field as the first responder and keep it the first responder or create your own keyboard.
来源:https://stackoverflow.com/questions/1103040/fixed-keyboard-inside-a-uiview