I created a screen that has a UITextField. When I get the EditingDidBegin event, I resignFirstResponder, create a Popover with another text field in it, and for that, TextField calls BecomeFirstResponder.
When it starts, I get a Flashing insert pointer and clear X content. Although there is no keyboard. The UIView wizard is set to UserInteractionEnabled: YES.
target action for the first UITextField, its own view.
[textField addTarget:self action:@selector(wantsToEditValue:) forControlEvents:UIControlEventEditingDidBegin];
Target action selector:
- (IBAction)wantsToEditValue:(id)sender {
}
Here is the code for creating the second UITextField. This code is in VC for Popover ..
- (void)viewDidLoad { if (IoUIDebug & IoUIDebugSelectorNames) { NSLog(@"%@ - %@", [self description], NSStringFromSelector(_cmd) ); } [super viewDidLoad]; [self createElementInputControl]; [self createWriteButton];
Create Input Code:
-(void) createElementInputControl { textFieldInput = [[UITextField alloc] initWithFrame:CGRectMake( kWriteElementOffset , kWriteElementHeightOffset, kTagValueInputInitialWidth, kWriteElementDefaultHeight)]; textFieldInput.borderStyle = UITextBorderStyleRoundedRect; textFieldInput.clearButtonMode = UITextFieldViewModeWhileEditing; textFieldInput.textAlignment = UITextAlignmentLeft; [textFieldInput setDelegate:self]; [textFieldInput setKeyboardType:UIKeyboardTypeDefault];
When I delete the startFirstResponder code, the Popover appears as usual, although the insert pointer does not blink. I touch the field, I get an input pointer, an X-clear button and yes a keyboard.
I want the keyboard to appear without having to click in a new text box.
Thanks!