ios - how to change background color of the navigation bar and navigation text color -


I want the background color of the navigation bar to be black and the text on the navigation bar wants to be white

< P> Everything looks fine on my simulator as shown below:

Enter the image However, when I test it on the actual device w / 7.1, even if the background color of the navigation bar is orange, the title of the screen is black. </ P> <p> This is what I am doing in my application representative: </ p> <pre> <code> @ window.rootViewController = UINavigationController.alloc.initWithRootViewController (main_controller) @ window.rootViewController.navigationBar.barTintColor = '# DF533B' To_color @ window.rootViewController.navigationBar.translucent = true @ window.rootViewController.navigationBar.tintColor = UIColor.whiteColor @ window.rootViewController.navigationBar.setTitleTextAttributes ({UITextAttributeTextColor = & gt; UIColor.whiteColor}) </ code> </ pre > <P> My <code> deployment_target </ code> is <code> 7.0 </ code> and <code> app.sdk_version </ code> is <code> 7.1 </ code> </ p> <P> what Should I put this code in all the controllers of <code> viewDidLoad </ code>? </ P> </ div> <p> <div class =

is not familiar with Ruby Motion, but you should use the UIAppearance proxy:

< Pre> [[UINavigationBar appearance] Set bertaint color: [self navbar collar]]; [[UINavigationBar appearance] SettentColor: [self navibetitler]]; [[UINavigationBar presence] setTitleTextAttributes: @ {NSForegroundColorAttributeName: [self-navitetter], NSFontAttributeName: [self-titlefont]}];

Before loading your main window in your app djallet you should do this.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -