I am creating UIImageView(s) and adding these views to a UIScrollView. The images show up when I am testing on a simulator, but when I test on an iphone 5s the images don't show up. Below is a list of things I have tried:
Clean Build
Reinstall App
Then I thought maybe it was a problem with retina images so I added retina images (the images are white pngs):
I am using the images as such:
UIButton *doneBttn = [UIButton buttonWithType:UIButtonTypeCustom]; [doneBttn setImage:[UIImage imageNamed:@"addButton.png"] forState:UIControlStateNormal]; [doneBttn setImage:[UIImage imageNamed:@"addButtonSelected.png"] forState:UIControlStateHighlighted]; [doneBttn setFrame:CGRectMake(0, 0, 50 , 30)]; [doneBttn addTarget:self action:@selector(dismiss) forControlEvents:UIControlEventTouchUpInside]; [uiNavView addMenuBarButtonRight:doneBttn];
I know the code above works, because the image is displayed in the simulator.
What do I need to change to get the image to display on my device? Also, I have checked to make sure the files are in the xcode project directory, and not just linked.