About setting and customizing the status bar and navigation bar

Source: Internet
Author: User

About setup issues with the status bar and navigation bar

1:statusbar font is white

In plist, set the view controller-based status bar appearance to NO; set Statusbarstyle to Uistatusbarstylelightcontent

2: Set StatusBar and Navigationbar as a whole

[Nav.navigationbar setbackgroundimage:[uiimage imagenamed:@ "Bg_navbar.png"] forbarposition: Uibarpositiontopattached Barmetrics:uibarmetricsdefault];

3:tabbaritem is checked for no effect, you need to call the method in Sdk7:

Compatible with iOS7 before
[Viewcontroller.tabbaritem SetFinishedSelectedImage:actionMenu.selectedIcon Withfinishedunselectedimage: Actionmenu.icon];
Methods of iOS7
ViewController.tabBarItem.selectedImage = Actionmenu.selectedicon;

4: Refresh status bar StatusBar

[Self setneedsstatusbarappearanceupdate]

5:navigationbar above the Barbuttonitem Word can not see the problem, Backbaritem arrow is not, you need

iOS7 set Barbuttonitem font color, it will be displayed, not including the return arrow
[[Uibarbuttonitem appearance] Setbackbuttontitlepositionadjustment:uioffsetmake (0, 0) forbarmetrics: Uibarmetricsdefault];
Set the Barbuttonitem color, including the return arrow
[[Uinavigationbar appearance] Settintcolor:[uicolor Whitecolor]];

6: Cancel iOS7 Self-gesture, such as Navigationcontroller's right slide back

self.navigationController.interactivePopGestureRecognizer.enabled = NO;

About setting and customizing the status bar and navigation 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.