I'm getting the following errors:
CUICatalog: Invalid asset name supplied: (null), or invalid scale factor: 2.000000
Could not load the "(null)" image referenced from a nib in the bundle with identifier "com.example.project"
I' m getting the errors since I set a "Selected Image" for a Tab Bar Item in Interface Builder:
I've added the file into Xcode:
The setting is written into the storyboard file:
<tabBarItem key="tabBarItem" title="..." image="config.png" selectedImage="config_filled.png" id="5Wh-7m-Y4H"/>
I'm using Xcode 6 Beta 6
I know about Error: CUICatalog: Invalid asset name supplied: (null), or invalid scale factor : 2.000000 but that doesn't help me.
What could cause that the asset name is null? I've reentered the image name, I also tried with cleaning and rebuilding but the error stays (and no image appears)
In Xcode 6.1, some attributes in Attributes Inspector did not work, but you can use "User Defined Runtime Attributes" to solve this problem.
I solve it like this:
I've finally ended up using this nasty code in AppDelegate:
UITabBarController *tabBarController = (UITabBarController *)self.window.rootViewController;
((UITabBarItem *)tabBarController.tabBar.items[0]).selectedImage = [UIImage imageNamed:@"light_filled"];
((UITabBarItem *)tabBarController.tabBar.items[1]).selectedImage = [UIImage imageNamed:@"umbrella_filled"];
((UITabBarItem *)tabBarController.tabBar.items[2]).selectedImage = [UIImage imageNamed:@"config_filled"];
Hopefully Apple will fix this bug soon.
Leave the "Selected Image" for a Tab Bar Item in Interface Builder empty should remove the warning message.
For me the solution was to check all your UIImageViews
in story, sometimes if you delete UIImageview
and restore them with Cmd+z, the image in the UIImageView
becomes "Unknown"
. I think it is a bug, since you can still see the image in the storyboard.
Solution: Select the image again in the UIImageView
in storyboard
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With