【问题标题】:MGSpiltViewController issue in iOS 7.0iOS 7.0 中的 MGSpiltViewController 问题
【发布时间】:2013-12-11 06:30:46
【问题描述】:

我需要将我的应用程序旧 UI 更改为与 iOS 7.0 兼容的最新平面 UI。为此,我必须更改我的应用程序的整个 UI。我的应用在iOS 7.0.下方运行良好

现在我的问题是关于 iOS 7.0 的应用程序状态栏。我的所有现有视图都被 iOS 7.0 中的状态栏重叠。对于viewcontroller,我找到了解决此问题的解决方案,但我没有为MGSplitViewController 找到任何解决方案。

您是否曾在您的应用程序中使用过此控件?您对此控制有任何解决方案吗?如果您有任何解决此问题的建议,请告诉我。

谢谢, Nilesh M. Prajapati

【问题讨论】:

标签: ios iphone objective-c ipad


【解决方案1】:

感谢您的帮助,但我尝试了以下解决方案。

- (CGSize)splitViewSizeForOrientation:(UIInterfaceOrientation)theOrientation
{
    if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) {// Added to solve iOS 7.0 status bar issue
        statusBarHeight = 0;
    }
} // This one solves my right panel issue.


- (void)layoutSubviewsForInterfaceOrientation:(UIInterfaceOrientation)theOrientation withAnimation:(BOOL)animate
{
    CGRect newFrame;
    if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) 
    {
        newFrame = CGRectMake(0, 20.0, width, height-20.0);
    }
    else
    {
        newFrame = CGRectMake(0, 0.0, width, height);
    }
}// this one solves left panel issue.

* 我还在所有 View 的 ViewDidLoad() 方法中放置了下面的代码。

if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0"))
{
    if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
        self.edgesForExtendedLayout = UIRectEdgeNone;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-09
    • 1970-01-01
    • 2014-05-14
    • 1970-01-01
    • 2012-07-15
    • 1970-01-01
    相关资源
    最近更新 更多