When ever I set an image for a UIImageView in IB and simulate the interface the buttons and stuff show up but the image view doesn't.
+2
A:
That's because the simulator used by Interface Builder is independent of your project. It's just taking your xib files, building the interface, and displaying it. As such, any resources it finds references to but can't find will be skipped. So if your UIImageView
uses an image named "myImage.png", then when the simulator runs, it's going to try to execute [UIImage imageNamed:@"myImage.png"];
. Since "myImage.png" is not part of the Simulator bundle, it will fail to create the image, and your UIImageView will be blank.
It can create buttons because (obviously) buttons are standard, globally available code. Your project-specific resources are not.
Dave DeLong
2009-11-14 16:04:06
Thanks, I was wondering why "simulate interface" didn't seem to be working
Casebash
2009-12-17 05:02:23