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 8652803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:23:33+00:00 2026-06-12T14:23:33+00:00

I am having problem in implementing the device orientation methods. I am implementing it

  • 0

I am having problem in implementing the device orientation methods. I am implementing it as

follows

-(BOOL)shouldAutorotate{


    return TRUE;

    }

    -(NSUInteger)supportedInterfaceOrientations{

    return UIInterfaceOrientationMaskAll;

    }

In tha appdelegate I am doing

self.window.rootViewController = self.splitViewController;

I want my app to work for all the orientations . But none of the orientation is working

properly.Any help ? My app is targeted IOS 4.3 , but it should also work for IOS 5 and 6 as well.

  • 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-12T14:23:34+00:00Added an answer on June 12, 2026 at 2:23 pm

    First of all, in AppDelegate, write this. THIS IS VERY IMP

    - (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
    {
         return (UIInterfaceOrientationMaskAll);
    }
    

    Also, A lot depends on with which controller is your UIViewController embedded in.

    Eg, If its inside UINavigationController, then you might need to subclass that UINavigationController to override orientation methods like this.

    subclassed UINavigationController (the top viewcontroller of the hierarchy will take control of the orientation.) needs to be set it as self.window.rootViewController.

    - (BOOL)shouldAutorotate
     {
         return self.topViewController.shouldAutorotate;
     }
     - (NSUInteger)supportedInterfaceOrientations
     {
         return self.topViewController.supportedInterfaceOrientations;
     }
    

    From iOS 6, it is given that UINavigationController won’t ask its UIVIewControllers for orientation support. Hence we would need to subclass it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a problem implementing the feed dialog function of Facebook within my canvas
I'm having a problem implementing a bi-directional parent/child relationship using hibernate 3. The parent,
I'm having a problem implementing a Feed-Forward MultiLayer Perceptron, with back-prop learning in OpenCL
Problem: I am having trouble implementing a recursive image lazy load in all relevant
I am having a specific problem implementing a parametrised class Parameter, but this is
I am having a really strange problem implementing Java REST service. I am trying
I'm having a problem with a weird error from boost::asio. I am implementing half
I'm having a quite strange problem with the fwd_iterator that I'm implementing: if I
I'm new to the world of IoC and having a problem with implementing it
Problem, I want to use sessions, but I am having issues with implementing sessions

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.