Search code examples
iphoneobjective-ciosuitableviewios4

Images in table view displayed in simulator but not displayed in my iPod device


I have a table view, and I have image file in my application folder and in Xcode.proj

Basically table view cell has an image view in it.

When I write code like this

cell.imageView.image = [UIImage imageNamed:@"Icon.png"] ;
cell.textlabel.text = @"icon Image"

it shows image and text in simulator, but only text in device.

What is the problem?


Solution

  • Two Reasons -

    1. Image is not present in your application bundle, add image in your project folder. (It is available on simulator, as you are referencing this from some location of your mac.)

    2. name is not correct(simulator is not case sensitive, while device is).