문제

Hey, I have an issue were I allow one viewcontroller to be displayed in portrait and landscape, however when the user hits the back button I want to switch the apps orientation back to portrait. At present if the user hits the back button when its in landscape mode the rest of the application stays in landscape mode, has anyone came across a solution for auto-rotating?

[EDIT]

The effect is similar to what occurs when use [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationPortrait]; but this is a hidden API method :-(

도움이 되었습니까?

해결책

What I got from your question is you want to rotate only one view portrait and landscape. If that is what you want, then just go to method - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

and then return true then your only that view will rotate.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top