[英]status bar is overlapping with navigation bar when showing uiviewcontroller with uipresentviewcontroller
I am presenting a uiviewcontroller in my app but the controller is overlapping with status bar. 我在我的应用程序中显示了一个uiviewcontroller,但该控制器与状态栏重叠。 It only has navigation bar and because of this my barbutton is overlapping with battery icon in status bar.
它只有导航栏,因此我的barbutton与状态栏中的电池图标重叠。 Any idea in showing navigation bar below status bar?
在状态栏下面显示导航栏有什么想法吗? I searched a lot but could not find a solution.
我进行了很多搜索,但找不到解决方案。 My code to present viewcontroller:
我呈现给viewcontroller的代码:
let timeVCObejct = self.storyboard?.instantiateViewControllerWithIdentifier("TimeConfigurationViewController") as? TimeConfigurationViewController
timeVCObejct?.delegate = self
self.presentViewController(timeVCObejct!, animated: true, completion: nil)
Use this property for your VC, in-order to avoid overlap of ur statusbar with your VC Swift : 为VC使用此属性,以避免ur statusbar与VC Swift重叠:
self.edgesForExtendedLayout = []
self.edgesForExtendedLayout = []
ObjectiveC C 物镜
self.edgesForExtendedLayout = UIRectEdgeNone;
self.edgesForExtendedLayout = UIRectEdgeNone;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.