Settings and usage of iOS settings navigation with its title color and font size and system default Tabbar

Source: Internet
Author: User

The first step:

Add a field to Info.plist: The View controller-base status bar is set to No;
Navigation color
[[Uinavigationbar appearance] Setbartintcolor:[uicolor XXXX];
[[UITableViewCell appearance] Setbackgroundcolor:[uicolor XXXX];

Set status bar (signal area) white
[[UIApplication sharedapplication] setstatusbarstyle:uistatusbarstyledefault];

Default with a certain transparency effect, you can use the following methods to remove system effects
[Navigationcontroller.navigationbar Settranslucent:no];

Change the navigation title font size and color to be set on the first level page as follows
Set the color and font size of the navigation default title
Self.navigationController.navigationBar.titleTextAttributes = @{uitextattributetextcolor: [Uicolor Whitecolor], Uitextattributefont:[uifont Boldsystemfontofsize:18]};

Step Two:

Uiimagerenderingmodealwaysoriginal let the picture show the pattern as the original style of the picture used to remove the system added color
if ([[Uidevice Currentdevice] Systemversion].floatvalue >= 8.0) {
Self.tabbaritem = [[Uitabbaritem alloc] initwithtitle:@ "title" Image:[[uiimage imagenamed:@ "Image.png"] Imagewithrenderingmode:uiimagerenderingmodealwaysoriginal] selectedimage:[[uiimage imageNamed:@ "ImageS.png"] Imagewithrenderingmode:uiimagerenderingmodealwaysoriginal]];

}else{

Self.tabBarController.tabBarItem.title = @ "title";
if ([[Uidevice Currentdevice] Systemversion].floatvalue >= 7.0) {

[Self.tabBarController.tabBarItem setfinishedselectedimage:[[uiimage imagenamed:@ "Image.png"] Imagewithrenderingmode:uiimagerenderingmodealwaysoriginal] Withfinishedunselectedimage:[[uiimage imageNamed:@ " Images.png "] imagewithrenderingmode:uiimagerenderingmodealwaysoriginal];
}else{
[Self.tabBarController.tabBarItem setfinishedselectedimage:[uiimage imagenamed:@ "Image.png"] Withfinishedunselectedimage:[uiimage imagenamed:@ "Images.png"];
}
}
Tabbar color used to change font color
[Self.tabBarController.tabBar Settintcolor:[uicolor XXXX]];

Settings and usage of iOS settings navigation with its title color and font size and system default Tabbar

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.