With the release of tvOS 9.1 and Xcode 7.2, my UITabBarItem
images are being displayed incorrectly. In my view controllers, I set the tabBarItem.image
and tabBarItem.selectedImage
with images using UIImageRenderingMode.AlwaysOriginal
.
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
self.tabBarItem.image = UIImage(named: "myTabImage")?.imageWithRenderingMode(.AlwaysOriginal)
self.tabBarItem.selectedImage = UIImage(named: "myTabImageSelected")?.imageWithRenderingMode(.AlwaysOriginal)
}
The selected image displays correctly, but the non-selected image displays as a template, that is, its color information is ignored.
Both images displayed correctly using the tvOS 9.0 SDK, but the non-selected image is displaying incorrectly in tvOS 9.1. To make matters worse, the non-selected images are being shown as black and the tab bar background is also black.
Here is the same code running on tvOS 9.0
I suspect this is a bug with tvOS 9.1, but has anyone found a workaround or see something that I am not doing correctly?