【发布时间】:2013-02-25 07:12:50
【问题描述】:
我正在使用外观代理来设置我的应用程序的样式,但是 [UIBarButtonItem 外观] 有问题;我只想为顶部 UINavigationbar 的按钮设置样式,但是当我运行下面的代码时,相同的样式也会应用于键盘的完成按钮。
NSDictionary *btnAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
[UIColor blackColor],
UITextAttributeTextColor,
[UIColor clearColor],
UITextAttributeTextShadowColor, nil];
[[UIBarButtonItem appearance] setTitleTextAttributes: btnAttributes
forState: UIControlStateNormal];
所以,我的问题是:是否有可能 - 使用外观代理 - 只为顶部导航栏的栏按钮设置样式?
【问题讨论】:
标签: ios objective-c uibarbuttonitem