【发布时间】:2017-02-27 11:28:29
【问题描述】:
我遇到了 UIBarButtonItem tintColor 的问题。
我在 AppDelegate 中设置了[[UIBarButtonItem appearance] setTintColor:[UIColor whiteColor]]; 以在应用中使用默认颜色
但是在这个屏幕上。它似乎看不到按钮,因为它是白色的!
我使用FBSDKShareDialog showFromViewController 显示共享弹出屏幕。如何编辑此屏幕的 tintColor?
编辑以解释更多。
作为建议,它仅适用于此屏幕。但实际上我的问题是在我将此屏幕更改为蓝色之后。它将影响发送电子邮件屏幕。所以在电子邮件屏幕中似乎也看不到按钮,因为我的导航栏是蓝色的。那是骗人的。我使用 UIActicityController 来呈现电子邮件屏幕。
【问题讨论】:
-
更改 appdelegate 文件中的代码 if([UINavigationBar conformsToProtocol:@protocol(UIAppearanceContainer)]) { [UINavigationBar appearance].tintColor = [UIColor whiteColor]; }
-
@Jigar 我必须设置
[[UIBarButtonItem appearance] setTintColor:[UIColor whiteColor]];,因为当用户点击发送到电子邮件时。按钮将默认设置为蓝色,我的导航栏颜色也是蓝色。所以它不会像这个按钮一样看到
标签: ios objective-c uinavigationbar uibarbuttonitem fbsdk