- (BOOL) textFieldShouldBeginEditing:(U ITextField *)textField {
// Make a new view, or do what you want here
UIDatePicker *pv = [[UIDatePicker alloc] initWithFrame:CGRectMake(0,185 ,0,0)];
[self.view addSubview:pv];
return NO;
}
You'll need to be implementing UITextFieldDelegate, and you can catch this event prior to the framework showing the UIKeyboard. In the above example I am showing a UIDatePicker instead. Returning NO is what is making the keyboard not show, since we aren't actually letting the editing begin.
Just wanted to thank you for the tip. I was using UITextField's inputView property instead, but it's only supported in iPhone OS 3.2+.
ReplyDelete