简体   繁体   中英

Presented view controller covers status bar in iOS 7

I have a presented view controller in iOS 7 that doesn't have a navigation bar, but the status bar is visible. I tried setting the edgesForExtendedLayout to UIRectEdgeNone, but that doesn't seem to do anything (unless I show a navigation bar, which I don't need).

Doesn't seem to be a topLayoutGuide in interface builder (view uses a nib, not a storyboard) and was having trouble with that anyway.

Could hide status bar like this:

[[UIApplication sharedApplication] setStatusBarHidden:YES];

But I don't really want to hide it. Note there are some similar questions, but they discuss using a navigation bar. This one, I don't want the navigation bar.

Screenshot: http://i.imgur.com/tZpKmdt.png

EDIT: Switched to using a storyboard and was able to get the top layout guide working properly

切换到使用情节提要,并且能够使顶部布局指南正常工作

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM