开发者

iPhone - Image in UIImageView does not shows up into simulator

I have imported some PNG pictures into my project, and into InterfaceBuilder, I add a UIImageView into a View. I set the Image property to the one imported (selecting it into the dropdown menu). It shows up. Then I run the simulator from IB, and everything is shown into the view except the image. What's the 开发者_运维技巧problem ? I didn't do anything else or more than what is said before.

The project is the default ViewBased project.


@Oliver you wont get the image in simulator if you are running from IB. You should run the simulator from the xcode. the image is in the xcode project folder not in your .xib file.

PS. If you run iPhone simulator from IB it will run just that .xib file and show you the contents that are added in the xib file, like labels textfileds. but it wont show you the image. if you want to see if the image view is proper or not just change the background color of the UIImageView to something other than the default and then run you will the color that you have selected from the IB in the simulator.

PSS. click on the xib file and in the option select open as source file. to check out how xib files are made.


Had the same problem. Solution: Go to Size Inspector. Change Show to Frame Rectangle. Build and run. Now the image will show itself. Change Show Back to is default setting.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜