iPad Rotation lock problem
Hellow i have a question about the rotation on iPad i have search but i have not found the correct awnser.
in the iPad app i can rotate to all interface orientations when i open a special overlay i will lock the interface orientacion to lanscape and as long as the overlay is open the application should not rotate. When i close this overlay the rotation should be e开发者_开发知识库nabled.
i hope someone can help me
Yes, you can achieve that. I have not tested this code, but I think it will work.
- (BOOL)shouldAutorotateToInterfaceOrientation(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations.
if (showing_OVERLAY == YES) {
return NO;
}
return YES;
}
精彩评论