Reputation: 545
In my iOS app I have a UITableViewController
with some custom cells containing UITextView
each one.
The reason I decided to use the UITableViewController
instead of a normal UIViewController
was because I wanted to automatically move up the view when the keyboard appear and it was working great at the beginning but when I needed to override the -viewWillAppear
method it stopped working. Does anyone knows how to fix this issue? Or can anyone explain to me why this is happening?
Upvotes: 0
Views: 254
Reputation: 4027
Didn't you forget to call [super viewWillAppear:animated]
in viewWillAppear:
? Most likely UITableViewController subscribes to keyboard notifications in viewWillAppear:
and unsubscribes in viewWillDisappear:
Upvotes: 4
Reputation: 950
must call
-(void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
}
Most likely UITableViewController subscribes to keyboard notifications in viewWillAppear: and unsubscribes in viewWillDisappear:
Upvotes: 1