【发布时间】:2015-08-04 16:40:02
【问题描述】:
我正在使用UIColor(patternImage:) 来改变UINavigationBar 的颜色,就像那样
UINavigationBar.appearance().barTintColor = UIColor(patternImage: UIImage(named: "Bar")!)
但是当我尝试使用 UIActivityViewController 在 Facebook 或 Twitter 上分享时,我收到了错误Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Only RGBA or White color spaces are supported in this situation
有没有其他方法可以实现这一点?
* 更新 *
目前唯一可行的解决方案是更改所有 ViewController 中的每个 UINavigationBar 色调
self.navigationController?.navigationBar.barTintColor = UIColor(patternImage: UIImage(named: "Bar")!)
【问题讨论】:
标签: ios swift uinavigationbar uicolor uiactivityviewcontroller