Nikunj Jadav
Nikunj Jadav

Reputation: 3402

iPhone:Orientation Issue

I have facing an issue that I want to change orientation according to user interface. What I mean iss when user change the app in to LandscapeLeft, LandscapeRight or Potrait mode, I want to change the orientation according to this change.

Please give me any link or any idea to develop this functionality.

Thanks in advance.

Upvotes: 1

Views: 77

Answers (1)

Satyam
Satyam

Reputation: 15894

In the method:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 

add the following code:

return YES;

Then your view controller will start rotating. Similarly add the above code in all the view controllers.
After that you have to handle all the controls are placement accordingly.

Upvotes: 3

Related Questions