在AppDelegate中的didFinishLaunchingWithOptions在這段代碼工作:
// Change the appearance of back button
UIImage *backButtonImage = [[UIImage imageNamed:@"button_back"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 13, 0, 6)];
[[UIBarButtonItem appearance] setBackButtonBackgroundImage:backButtonImage forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
// Change the appearance of other navigation button
UIImage *barButtonImage = [[UIImage imageNamed:@"button_normal"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 6, 0, 6)];
[[UIBarButtonItem appearance] setBackgroundImage:barButtonImage forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
FOT TEXT:
[[UINavigationBar appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
[UIColor colorWithRed:245.0/255.0 green:245.0/255.0 blue:245.0/255.0 alpha:1.0], UITextAttributeTextColor,
[UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.8],UITextAttributeTextShadowColor,
[NSValue valueWithUIOffset:UIOffsetMake(0, 1)],
UITextAttributeTextShadowOffset,
[UIFont fontWithName:@"HelveticaNeue-CondensedBlack" size:21.0], UITextAttributeFont, nil]];
,或者你可以修改文字顏色的按鈕,
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
和。 ..你的觀點的結構是什麼?導航控制器?還有哪些其他按鈕將被添加和刪除?你嘗試了什麼? – Wain
http://stackoverflow.com/questions/19029833/ios-7-navigation-bar-text-and-arrow-color – the1pawan
用代碼更新。該stackoverflow問題不是我所需要的,但謝謝。 – jimbob