Issue with UIView size and pushViewController
I have UINavigationController with UIView which have table, text field and button. When user focus on text field I resize UIView for keyboard using following code:
CGRect viewFrame = self.view.frame;
viewFrame.size.height = 460.f - (up ? 260.f : 44.f);
self.view.frame = viewFrame;
After user click on the button I switch to the next view using following code:
UserViewController *userViewController = [UserViewController userWithId:((UIButton *)sender).tag];
[self.navigationController pushViewController:userViewController animated:YES];
The problem is that when I'm switching to next view the current view which is resized returns back to ori开发者_如何学编程ginal size and I don't like how that looks. I want to keep size of UIVIew and keyboard during animation and return it back to default state only after user click back button.
Maintain You UIView Resize Coading in
-(void) ViewWillAppear :(BOOL) animation { ..coading }
-(void) ViewWillDisAppear :(BOOL) animation {
}
精彩评论