我想用iOS 7风格创建iOS 6应用程序..
到目前为止我可以实现它,最后一个问题是NavigationBarItem动作按钮,颜色是白色。
如何通过在AppDelegate.m
中添加几行来更改文本的背景和颜色UIImage *backButtonImage = [UIImage imageNamed:@"button_back.png"];
[[UIBarButtonItem appearance] setBackButtonBackgroundImage:backButtonImage forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[[UIBarButtonItem appearance] setBackgroundImage:backButtonImage forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[[UIBarButtonItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor colorWithRed:(21/255.0) green:(125/255.0) blue:(251/255.0) alpha:1],
UITextAttributeTextColor,
[UIColor clearColor],
UITextAttributeTextShadowColor,
[NSValue valueWithUIOffset:UIOffsetMake(0, -1)],
UITextAttributeTextShadowOffset,
[UIFont fontWithName:@"Helvetica Neue" size:17.0],
UITextAttributeFont,
nil] forState:UIControlStateNormal];
button_back.png
实际上是空白图片。我想让背景空白。