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

  • Home
  • SEARCH
  • 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 8307291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:29:50+00:00 2026-06-08T18:29:50+00:00

I have a problem with my app. I would like lock rotation on specific

  • 0

I have a problem with my app.
I would like lock rotation on specific view.
For that, I use rootviewcontroller which contain two custom viewControllers.
I have try to override the shouldAutorotateToInterfaceOrientation method on my two viewcontrollers but if I allow all rotation on my rootViewController, all my viewcontrollers can rotate like my rootviewcontroller and I don’t understand why.

Actually I use this configuration :

RootviewController
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    //By default, i allow all rotation
   return YES
}

FirstCustomviewController
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    //On my first viewController, I allow only orientation in portrait
   return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

But in all case, it allow all rotation (I think it come from rootviewcontroller) and why I can’t override this method ?
What can I do for that ?

Thanks

  • 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-08T18:29:51+00:00Added an answer on June 8, 2026 at 6:29 pm

    RootViewController and FirstCustomViewController relations is exactly push-view or modal-view? If a relations is push-view, all sub-view rotation is rely on the root-view.

    Think of a UINavigationController as a house and UIViewControllers as rooms. All the rooms in the house will rotate in the same way the house. There is no way to turn a room without turning the house and other rooms.

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

Sidebar

Related Questions

I have an odd problem that is crashing my app, that I would like
I have an app that I would like to have video capture for the
I have a .NET app that I would like to install on a VM
I have a problem in my web forms ASP.NET app where I would like
I have got huge problem with my Android app and I would like to
Hello I am a Java web app developer I have a problem, I would
I have a problem regarding Android App. I have created an application that download
I have a little Problem with the app that I'm developing. In the App
In order to internationalize my app I would like to have named routes like
I'm working on an iPhone app and would like to have a simple text

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.