Configure the navigation bar

Source: Internet
Author: User

?/* Appdelegate */

set the white navigation bar

-(uistatusbarstyle) Preferredstatusbarstyle

{

return uistatusbarstylelightcontent;

}

?/* Controller */

Fix the size of the text displayed on the navigation bar ( pin for all interfaces )

nsdictionary *dic = @{nsforegroundcolorattributename: [uicolor cyancolor], Nsfontattributename: [uifont systemfontofsize:]};

self. Navigationcontroller. Navigationbar. Titletextattributes = dic;

//

?// Configure the navigation bar , the same as the navigation bar effect of all the interface after the configuration is completed

-(void) Configuernavigationbarcommonproperty

{

// Modify the color of the navigation bar

Self.navigationController.navigationBar.backgroundColor = [Uicolor Graycolor];

// Modify the render color of the navigation bar

self. Navigationcontroller. Navigationbar. Tintcolor = [uicolor magentacolor];

// Turn off the glass effect of the navigation bar

self. Navigationcontroller. Navigationbar. Translucent = YES;

// when the nav bar glass effect is turned off , the contentview of the navigation controller is shifted downward by

// Hide navigation bar

self. Navigationcontroller. Navigationbarhidden = NO;

// navigation bar settings Picture

[self. Navigationcontroller. Navigationbar setbackgroundimage: [UIImage imagenamed:@ "32000.png"] Forbarmetrics:uibarmetricsdefault];

/**

* picture size >44 or >44 <64, picture tiled display to status bar and navigation bar

when the picture size =44 picture will only display in the navigation bar ,

=64 when the picture will love you are in the status bar and the navigation bar

*/

}

Configure the 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.