无法更改UITabBarItem.image:CSI中不支持的像素格式

我试图通过代码更改标签栏中显示的图像。 我目前正在使用Swift和Xcode 6testing版3.我在Images.xcassets和AppDelegate中导入了我的tabBarImage.png和tabBarImage@2x.png我写这个:

func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: NSDictionary!) -> Bool { let mainColor = UIColor(red: 1.0, green: 91.0/255.0, blue: 84.0/255.0, alpha: 1.0) UITabBar.appearance().barTintColor = mainColor let tabBarController = self.window!.rootViewController as UITabBarController var tabBarSubcontrollers = tabBarController.viewControllers as [UIViewController] let tabBarImages = ["tabBarImageOne", "tabBarImageTwo", "tabBarImageThree"] for index in 0..<(tabBarSubcontrollers.count) { let tabBarImage = UIImage(named: "\(tabBarImages[index])").imageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal) let newTabBarItem = UITabBarItem(title: "", image: tabBarImage, selectedImage: tabBarImage) newTabBarItem.imageInsets = UIEdgeInsetsMake(5.0, 0.0, -5.0, 0.0) tabBarSubcontrollers[index].tabBarItem = newTabBarItem } return true } 

如果我在模拟器上运行它,它工作得很好,并显示标签栏中的图像。 如果我在我的iPad(iOS 7.1.1)上运行它,它不会加载图像,并显示这个奇怪的错误:

  Unsupported pixel format in CSI Unable to create unsliced image from csi bitmap data. 

有任何想法吗? 它可能是某种错误? 什么是CSI位图数据呢?

格儿。

这似乎是一个iOS 7的问题。 它适用于iOS 8。

Beta 2生成的iOS 7的东西; 没问题。

Beta 3似乎只适用于iOS 8。

我怀疑在iOS 7上尝试Swift的人是SOL

我有一个项目,我将上传到我的服务器,你可以搞砸了。

更新: 这是testing项目

更新2(2014年7月21日):这个错误似乎在Xcode 6 beta 4中得到了修复。

然而,斯威夫特似乎是一个相当迅速移动的目标…