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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:42:26+00:00 2026-05-15T10:42:26+00:00

As the title says. My UIViewController will not rotate no matter what. When it

  • 0

As the title says. My UIViewController will not rotate no matter what. When it loads shouldAutorotateToInterfaceOrientation is being called but after that it doesnt.

UPDATE 1:

It’s a really really wierd problem. At least for me. And i ll try to explain everything.

It’s a navigation based app. Every controller has

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

Xcontroller is a child of Acontroller and it doesn’t auto rotate. If Xcontroller become a child of Bcontroller then it will autorotate. So something is wrong with Acontroller. But Acontroller is identical (except its data) to Bcontroller.

Whats Wrong?

UPDATE 2:

I decided to recreate Acontroller. And it worked.I believe I was missing something stupid.

  • 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-05-15T10:42:27+00:00Added an answer on May 15, 2026 at 10:42 am

    I am not sure whether it’s the same reason as your case. But I experienced the same thing. the shouldAutorotateToInterfaceOrientation was only called once in the beginning.
    After some serious debugging by taking code apart, I found that the reason is in my overridden init method.
    I had this before:

    - (id)initWithAlbum:(PhotoAlbum *)theAlbum {
        if (self) {     
            self.photoAlbum = theAlbum;     
        }
        return self;
    }
    

    And then I changed to this

    - (id)initWithAlbum:(PhotoAlbum *)theAlbum {
        if (self = [super init]) {      
            self.photoAlbum = theAlbum;     
        }
        return self;
    }
    

    Note: the only difference is I added [super init] to call the parent init.
    After this change, the rotation works well and the shouldAutorotateToInterfaceOrientation is being called everytime I rotate the screen.
    Hope this help.

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

Sidebar

Related Questions

Pretty much what the title says really. We have some code that is .NET
Just as the title says. I want to write a script that behaves differently
Title says what i'm trying to do. I can successfully generate an assembly if
Title says it mostly. I want to add a simple extension method to the
Question title says it all really - a lot slower than VS2005, with a
As title says, how do I call a java class method from a jsp,
Just what the title says, I need to change the password for an existing
As the title says on a website is it possible to tell if a
As the title says: What is the difference between a non-secure random number generator
Like the title says Where and How (i.e. if encrypted, with what method) does

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.