I want to put something like this in a method for UITextField
& UITextView
.
- (void)changeKeyboardType:(UIKeyboardType)keyboardType
For each of these, you can create a category.
Interface file:
@interface UITextField (ChangeKeyboard)
- (void)changeKeyboardType:(UIKeyboardType)keyboardType;
@end
Implementation file:
@implementation UITextField (ChangeKeyboard)
- (void)changeKeyboardType:(UIKeyboardType)keyboardType {
self.keyboardType = keyboardType;
[self resignFirstResponder];
[self becomeFirstResponder];
}
@end
That would be the way to add these, but I haven't tested the functionality.