I have a login page presented as a modal view controller and when the UITextField become the first responder under portrait mode the view shifts to the left. I wonder why is this?
The code is very simple:
LoginViewController* lvc = [[LoginViewController alloc] init];
lvc.delegate = self;
[self.parentViewController presentModalViewController:lvc animated:YES];
[lvc release];
This is inside a UIViewController called OptionsViewController which is presented as 开发者_C百科a modalViewController as well. So basically I am presenting a modalViewController from a modalViewController
If you see clearly on the second image, there is a tableView when the keyboard comes up and the login view controller (that view) seems to causing problems because of the issues with the table.
Either you have initialized a tableView from somewhere in the code (or) my guess is that you have created the login view controller along with another TableView controller .xib interface... So please check your code.
If there is no tableView initialization on your code ... then try following these steps.
- Delete the nib file.
- Create a new fresh one with the same view and clearly follow the same procedure and please keep us posted on the outcome.
精彩评论