March 2014
Intermediate to advanced
672 pages
40h 11m
English
The UIDevice class does not report a proper orientation when applications are first launched. It updates the orientation only after the device has moved into a new position or UIViewController methods kick in.
An application launched in portrait orientation may not read as “portrait” until the user moves the device out of and then back into the proper orientation. This condition exists on the simulator and on the iPhone device and is easily tested. (Radars—tickets filed in Apple’s issue tracking system—for this issue have been closed with updates that the features are working as designed.)
For a workaround, consider recovering the angular orientation from the accelerometer via Core Motion. You can ...
Read now
Unlock full access