Orientation with tabbar problem
I have a problem with my tabbar application.. My app can change orientation but when I'm on landscape in (for exemple) my first tab, everything work great, everything is replace but 开发者_如何学Cif I stay in landscape and I go in an other tab, the app still on landscape view (that's good) but the objects (labels, buttons, images,..) are not where it should be...
For check if the devise is in landscape or portrait, I use this
-(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
If (toInterfaceOrientation == UIInterfaceOrientationPortait)
{
image1.hidden = NO;
}
else
{
image2.hidden = YES;
}
}
It work but I have to change the orientation when I want to go on an other... Hope someone can help me..
Thanks :)
Make sure all your viewcontrollers within the tabs are returning YES for landscape orientation in
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
精彩评论