标签栏方向问题
我的标签栏应用程序有问题.. 我的应用程序可以改变方向,但是当我在第一个选项卡中处于横向(例如)时,一切都很好,一切都被替换,但如果我保持横向并进入另一个选项卡,应用程序仍然处于横向视图(即好)但对象(标签、按钮、图像等)不在应有的位置...
为了检查设备是横向还是纵向,我使用它
-(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
If (toInterfaceOrientation == UIInterfaceOrientationPortait)
{
image1.hidden = NO;
}
else
{
image2.hidden = YES;
}
}
它可以工作,但我必须在需要时更改方向继续另一... 希望有人可以帮助我..
谢谢:)
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 if 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 :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保选项卡中的所有视图控制器对于横向方向都返回 YES
Make sure all your viewcontrollers within the tabs are returning YES for landscape orientation in