问题描述:

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.

网友答案:

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.

相关阅读:
Top