How do you stop autorotate when a modal view is active?
My application crashes if I attempt to rotate the iPad when a modal view is present. How do you stop autorotation while modal views are present or better yet how do you make it so that modal view rotates along with everything else (when the application crashes ev开发者_运维知识库erything rotates but the modal view)? Many thanks!
I'd suggest finding the reason for the crash. Anyway, if you really want to stop the interface from rotating, use
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
Return NO
if you are currently showing a modal view.
精彩评论