【发布时间】:2013-06-30 15:10:09
【问题描述】:
我有一个标签栏应用程序,它在一个标签中显示网络浏览器。当您旋转视图时,一切正常,但是当您切换到另一个选项卡然后以横向返回该选项卡时,视图 webview、搜索栏和工具栏将返回纵向布局。这是我使用的代码,但它没有t 似乎工作:
#define isPortrait [[UIApplication sharedApplication] statusBarOrientation] == UIInterfaceOrientationPortrait || [[UIApplication sharedApplication] statusBarOrientation] == UIInterfaceOrientationPortraitUpsideDown
if(isPortrait)
{
browser.frame = CGRectMake(0, 68, 320, 408);
addressBar.frame = CGRectMake(0, 23, 320, 44);
toolBar.frame = CGRectMake(0, 478, 320, 44);
}
else
{
browser.frame = CGRectMake(0, 68, 320, 408);
addressBar.frame = CGRectMake(0, 23, 320, 44);
toolBar.frame = CGRectMake(0, 478, 320, 44);
}
这一切都在我的 viewdidload 方法中。
【问题讨论】:
标签: ios uiwebview uisearchbar uitabbar uitoolbar