Picture Disappearing in Landscape View


Hoping that someone can point me in the right direction to fix this.

I have gone over the code from the book twice to search for typos on my part and also searched in Overstack.com.
I am running the simulator only for now in Xcode 4.6.2.

The orientation changes are logging but when the device is in Landscape, the picture disappears. It only shows up in the portrait view.

Anyone else having this issue?


Think I’m going to chalk this up to simulator weirdness.

Picture shows up perfectly once I go to a Universal application and test it in the iPad simulator.


I had the same issue and fixed it by noticing that the strut holds the amount of space between the bottom of the view and the bottom of the screen constant. If the bottom of your view is far from the bottom of the screen in portrait mode, the view will become smaller (or perhaps disappear) when you rotate your view to portrait. If there is a lot of space above and below the UIImageView’s frame and you have both struts on, you end up with the bottom of the rotated UIImageView’s frame being above the top of the frame. This makes the photo “disappear” from the window when you rotate it.