on-internet
← Community

iPhone lock portrait orientation

Stack Overflow ·

I realize there are a few threads regarding this issue. However, I am new to this, and some of the solutions I found did not work for me. I have an iPhone app that should support all orientations except in one view. This view I would like to lock in portrait only. I tried this code, but it still goes to landscape mode when I flip the phone... what am I doing wrong? - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationPortrait); } - (BOOL)shouldAutorotate { return NO; } - (NSUInteger)supportedInterfac

Comments

Sign in or sign up to comment and upvote.

No comments yet.