Question iPhone SDK for you.
I created the UIViewController category to switch the view up when UITextFields are edited and the keyboard appears, blocking the fields. I found the code online, and no doubt you, his guru, are familiar with it. The interface is as follows:
@interface UIViewController (Shiftable)
- (IBAction) textFieldDidBeginEditing:(UITextField *)textField;
- (IBAction) textFieldDidEndEditing:(UITextField *)textField;
- (void) animateTextField: (UITextField *)textField up:(BOOL)up;
@end
My problem is that each of my UIViewControllers is affected by this category! I thought this would only affect UIViewControllers that import the category as follows:
#import "UIViewController Shiftable.h"
But even UIViewControllers that don’t import this category have their views shifted when UITextFields are edited, and, of course, some of my views do not need to be changed when the keyboard appears, when the keyboard does not hide the fields.
? - ?
.