I am using iOS 7 SDK and Xcode 5. I want to set icons on UITabBarItem. I am using below method.
setFinishedSelectedImage: withFinishedUnselectedImage:
It was working till now. But suddenly it stopped displaying images.
I tried below various options :
[img imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
[tabBarItem setSelectedImage:img];
[tabBarItem setImage:img];
[[UITabBarItem alloc] initWithTitle:title image:img selectedImage:img];
None of them is working. Here, img
is the image downloaded from URL.
Then I tried with one of the images in app resource and it was displaying.
After that, I tried using temporary UIImageView
with background color to red and set img
to this UIImageView
, it displayed red color instead of img
.
But strange part is that I use the same img
in other view controllers where it is displayed correctly.
Any idea how to solve this issue?