Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8674077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:36:58+00:00 2026-06-12T19:36:58+00:00

I developed IOS 5 application using game center. Now I want my code to

  • 0

I developed IOS 5 application using game center. Now I want my code to run on IOS 6. So I have let my application to support both orientation i.e landscape and portrait so that it does not crashes when game center login screen pops up. But after that, my home view controller does not starts in landscape view. Instead when I go to a further view, it opens in landscape, and then when i come back, then the home view opens in landscape. But home view does not opens to landscape mode for the first time.

Here is the code :

- (BOOL)shouldAutorotate
{
  return YES;
}

-(NSUInteger)supportedInterfaceOrientations
{
  return UIInterfaceOrientationMaskLandscape;
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
  return UIInterfaceOrientationLandscapeLeft;
}

These are the delegates I use in home view for IOS 6.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T19:37:00+00:00Added an answer on June 12, 2026 at 7:37 pm

    Add this method in your app delegate to support desired orientation for IOS 6..

    -(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
    
    {
       if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
            return UIInterfaceOrientationMaskAll;
        else  /* iphone */
            return UIInterfaceOrientationMaskAllButUpsideDown;
    }
    

    and use these delagates for orientation in rest of clases for IOS 6.

    - (BOOL)shouldAutorotate
    {
    
    return YES;
    }
    
    -(NSUInteger)supportedInterfaceOrientations
    
    {
    return UIInterfaceOrientationMaskLandscape;
    
    }
    
    - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
    {
      return UIInterfaceOrientationLandscapeLeft;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've developed an iOS application using the Appcelerator's Titanium framework, I want to integrate
I have an application developed on iOS & Android using phonegap 1.6.0 & JQM
I have an iOS application that was developed using Xcode Version 4.5.1. My iOS
Possible Duplicate: iPhone development on PC I have developed an iOS native application. My
I have an application that is developed for ios lower than ios 5.. it
I have developed a ios game with 20 levels. I have menu at starting
I have developed an application using last SDK (4.3) and XCODE 4. I have
I have already developed an app for iOS and I want to upload it
I have integrated the paypal in my iOS application using latest MPL library. The
I have an application developed in Adobe AIR and compiled using Flex SDk 4.6

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.