【发布时间】:2014-12-24 01:41:26
【问题描述】:
在某些设备上,我的 UIBarButtonItem 按钮具有背景颜色。我不知道这是什么原因造成的。以下是它在某些设备上的外观:
在大多数设备和所有设备类型的模拟器中,它应该并且确实看起来像这样:
我确实对外观进行了很多更改,但我看不出这些设置中的任何一个会如何导致此问题。这是我的外观设置:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
UIApplication.sharedApplication().statusBarStyle = .LightContent
UINavigationBar.appearance().barStyle = .Black
UINavigationBar.appearance().barTintColor = UIColor.darkGrayColor()
UINavigationBar.appearance().tintColor = UIColor.whiteColor()
UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName: UIColor.whiteColor()]
UIToolbar.appearance().barTintColor = UIColor.darkGrayColor()
UIToolbar.appearance().tintColor = UIColor.whiteColor()
UITableView.appearance().backgroundColor = UIColor.blueColor()
UITableView.appearance().tableFooterView = UIView(frame: CGRectZero)
UITableViewHeaderFooterView.appearance().tintColor = UIColor.blueColor()
return true
}
【问题讨论】:
-
你是如何设置“全局”的?是在特定的框架中还是什么?
-
是iOS版本问题吗?
标签: ios uibarbuttonitem uiappearance