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.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- back button text does not change
相关文章
- 现在使用swift开发ios应用好还是swift?
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- How can I add media attachments to my push notific
- How do you detect key up / key down events from 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.