Saggy
Saggy

Reputation: 465

UIImage is returning null

I created app that perfectly works on xcode 5, but it not show images in xcode 6, in iphone 6 simulator. This code is returning null.

code:

UIImage *img=[UIImage imageNamed:@"[email protected]"];

Upvotes: 0

Views: 94

Answers (1)

G.P.Reddy
G.P.Reddy

Reputation: 556

I also faced this issue once, the cause of this issue was that I am not taking care of image name by assigning it to UIImageView, make sure that you are assigning UIImageView the exact name of the image as it is in the main bundle.

The simulator can read the image name if there is any case-sensitive issue or some extension issue like i.e. .png , .jpg, but device never reads the image name if there are issues in the naming conventions, device always treat the image name as exact.

Upvotes: 1

Related Questions