Tutorial details

Support Orientations  | App Code for Sale | Preview

Support Orientations | iOS Tutorial

How to support orientations

Overview PAGE TOP

Reference: http://www.geekylemon.com/WEBPROTECT-xcodesupportorientatio.htm

In this tutorial i will be showing you how to support orientations

Features:

  • device rotation

Supporting orientations in your app allows users to place there device in there hand in the way they want whether the home button is to the left or right or even up in the air the app will be supported no matter what postion the device is

What To Do! PAGE TOP

Select your device orientation in your project settings and place the following code at the bottom of you .m

ViewController.m PAGE TOP

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}

 Support both protrait orientations 
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsProtrait(interfaceOrientation);
}

Reference PAGE TOP

http://www.geekylemon.com/WEBPROTECT-xcodesupportorientatio.htm

1 Comments Leave a comment

Please login in order to leave a comment.

Newest first
  • jlandyr 2014-03-30 19:41:20 Thread #76

    It does not work in iOS 7. How can I solve this problem in iOS 7 with Xcode 5?

  • jlandyr 2014-03-30 19:41:20

    It does not work in iOS 7. How can I solve this problem in iOS 7 with Xcode 5?

!

Sign-in to your Chupamobile Account.

The Easiest way to Launch your next App or Game.

Join Chupamobile and get instant access to thousands of ready made App and Game Templates.

Creating an account means you’re okay with Chupamobile’s Terms of Service and Privacy Policy.