I’ve read ALL of the posts on this topic, but still can’t figure this one out.
I add a VC to the window in applicationDidFinishLaunching. The VC contains a UIImageView.
I want to set the image of the UIImageView based on the device orientation, but statusBarOrientation, deviceOrientation, interfaceOrientation, everything I check returns portrait.
There’s gotta be something simple I’m missing.
Your help is appreciated.
Well.. it seems there were several issues. 1) The simulator doesn’t consistently generate orientation (or change in orientation) data as expected. Also, 2) immediately at start up, the device may (or may not) send statusBarOrientation info in time to read that. So, I did this right in the didFinishLaunching method in the app delegate.
And then I animate away the splash IV with a delay.
Not very elegant, but it works.