views:

43

answers:

1

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 everything rotates but the modal view)? Many thanks!

A: 

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.

tob
I'm silly. I should first find the reason for the crash (found it). New rule: Apple's programming seldom has bugs in it and I should assume first that something is up with my code. Thanks Tob.
Salvi