【问题标题】:Status bar Overlap issue iOS7 and tabbar issue状态栏重叠问题 iOS7 和标签栏问题
【发布时间】:2013-10-08 19:16:25
【问题描述】:

我正在开发带有状态栏和标签栏的应用程序。在 ios7 中,状态栏与视图重叠。但使用以下代码修复了状态栏问题。当我喜欢我的标签栏时,我会降低 20 像素。标签栏中的某些部分被隐藏了请帮助我。此应用程序中也存在方向。

CGRect TempRect;
for(UIView *sub in [[self view] subviews]) 
{ 
     TempRect=[sub frame];
     TempRect.origin.y+=20.0f; //Height of status bar [sub setFrame:TempRect]; 
}

【问题讨论】:

    标签: objective-c cocoa-touch uikit


    【解决方案1】:

    我在 viewDidLoad: 中将它添加到我的 UIViewControllers 中,它受到了影响,它为我解决了这个问题:

    if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
        self.edgesForExtendedLayout = UIRectEdgeNone;
    

    【讨论】:

    • 不,我用过这个,但我的标签栏仍然向下 20 像素。
    猜你喜欢
    • 2013-10-26
    • 2013-09-29
    • 1970-01-01
    • 2013-09-27
    • 1970-01-01
    • 2013-11-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多