But the problem is when I launch app in Landscape mode I can see the login view correctly and I rotate the iPad to portrait mode the background of login viewcontroller that is my First tabbar viewcontroller goes up by about 20pixels
I create a new app to check and I found this will only happend when we use tabbar.
and when App launches in portrait mode its works great!-(void)gotoCredentials {
Login *objLoginViewController=[[Login alloc] initWithNibName:@"Login" bundle:nil];
UINavigationContr开发者_运维技巧oller *objnavigationController = [[UINavigationController alloc]
initWithRootViewController:objLoginViewController];
objnavigationController.modalPresentationStyle=UIModalPresentationFormSheet;
objLoginViewController.modalPresentationStyle=UIModalPresentationFormSheet;
[self presentModalViewController:objnavigationController animated:YES];
//[self.tabBarController presentModalViewController:objnavigationController animated:YES];
[objLoginViewController release];
objLoginViewController=nil;
[objnavigationController release];
objnavigationController=nil;
}
thanks in advance!
sorry it is fixed by setting tabbar controller selection
[m_objTabBarController setSelectedIndex:0];
after creating tabbar. I dont know that happens here.
But I think to do so is because after dissmiss FormSheet and change the tab then looks fine so I try setting tabbar selected index and it work great...
精彩评论