Xcode6 IOS sdk8.1 hidden system status bar

Source: Internet
Author: User

After upgrading the project code (uzplayer) from iOS6 to IOS8, it is found in the video playback, behind the background is the system's status bar:



This can cause some time to press the Done button, or the drag slider has no effect


So, we need to figure out a way to get rid of this system status bar.



There are two ways


1, first to see, the back of the system's status bar to hide, the code as follows (added in the view above the playback):

-(Uistatusbarstyle) preferredstatusbarstyle{    return uistatusbarstyledefault;    Uistatusbarstyledefault = 0 Black text, light background with    //uistatusbarstylelightcontent = 1 white text, dark background with}-(BOOL) prefersstatusbarhidden{    

The effect is obvious:


White bars replace the system status bar



2, do not write code, by modifying the way the. plist file is hidden

Locate the. plist in the project (corresponding to 1)-------------------find the 2 plus-----------------------Select 3 of the viewcontroller-based status bar Appearance-------------------Sets the Boolean value of this item (no means that the system's status bar is not displayed)

The effect is actually the same:


However, it is recommended to use the first method

Xcode6 IOS sdk8.1 hidden system status bar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.