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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:41:53+00:00 2026-06-11T22:41:53+00:00

So, as by the question, I use the following code to set userinterfaceOrientation for

  • 0

So, as by the question, I use the following code to set userinterfaceOrientation for the viewcontroller.

- (BOOL) shouldAutorotate
{
    return YES;
}

-(NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskPortrait;
}

I tried setting UIInterfaceOrientationMaskAll for another viewController.

Prior, I checked all the items for Supported interface orientations in the info-plist. Both the viewControllers returned true(as set in the info-plist) for all the orientations and didn’t obey the above code. IT worked even in the absence of the above code. Is there anyway to restrict certain Supported interface orientations for particular classes? I made it working for the pre – iOS6 versions by following this link.

  • 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-11T22:41:54+00:00Added an answer on June 11, 2026 at 10:41 pm

    I was able to accomplish this by placing my supported orientation logic in a custom UINavigationController. I then segue to the relevant view controller.

    @implementation PortraitNavigationController
    
    - (NSUInteger)supportedInterfaceOrientations{
        return UIInterfaceOrientationMaskPortrait;
    }
    

    …

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

Sidebar

Related Questions

I use following code for guarantee startTime variable set once only: public class Processor
Following on from a previous question, for some reason when I use the following
Following this question , I use this function to convert arrays to objects, function
The basic components of my question are (context follows code snippet) Is the following
I have a question about .net generics. Consider the following code: public abstract class
I want to ask a question about the JSP. I writing the following code
I have the following code: set<Key> test; test.insert(key1); test.insert(key2); iter1 = test.find(key1); iter2 =
I've written the following code to set the properties on various classes. It works,
I have the following LINQ code. public List<IGrouping<Guid, ProfileImage>> GetAllUser() { return _profileImageRepository.QueryProfileImage() .GroupBy(g
I got the following code: set<Object*>::iterator it; try { for (it = SetOfObjects->begin(); it

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.