Found that if I use the following method to check if the device orientation has changed, the result is not quite accurate.
UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation)
Specially when you lay the iPhone/iPad down flat on the table, then slightly lift one side up and down. When you reached certain angle the result will change, specially bad with the iPad.
After a few trial, I found the "self.view.bounds.size" is actually more accurate in indicating whether it's in landscape of portrait mode, and have to combine the two.
Any one has similar experience or better idea?
0 comments:
Post a Comment