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

As the title says none of my tableview controller methods are being called. The
As title says, i know that new throws an exception which can be caught,
The title says it! I know that Jon Skeet was working on an implementation
As title says I'd like to know how to restart my iPhone app after
Well title says all I guess. I've tried to print_r($_SERVER) but my 'post-request' I
as the title says, is there a way I can have a clock that
As title says, I will be developing an asp .net web-application all geared around
As the title says, I share the same logic between an UIViewController and an
Title says most of it. I have a div container that holds all the
Title says all. I'll have navigation that looks like this and it's dynamically created

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.