Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
shouldAutorotateToInterfaceOri entation never called
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Paul Cantrell  
View profile  
 More options Mar 2 2009, 6:14 pm
From: Paul Cantrell <cantr...@pobox.com>
Date: Mon, 2 Mar 2009 17:14:03 -0600
Local: Mon, Mar 2 2009 6:14 pm
Subject: shouldAutorotateToInterfaceOrientation never called
I'm try to make my app rotate, and I find that  
shouldAutorotateToInterfaceOrientation is never called.

This has worked in the past with no trouble, but this time, I have a  
rather complex view hierarchy:

        UITabBarController
                MyThingerController
                        MySubThingerController

I tried overriding shouldAutorotateToInterfaceOrientation on all three  
controllers; it's not called anywhere.

Anybody have any theories on why it would never be called?

Cheers,

Paul


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil Mix  
View profile  
 More options Mar 2 2009, 9:00 pm
From: Neil Mix <neil...@gmail.com>
Date: Mon, 2 Mar 2009 20:00:29 -0600
Local: Mon, Mar 2 2009 9:00 pm
Subject: Re: shouldAutorotateToInterfaceOrientation never called
I remember encountering this once.  I think the problem turned out to
be that my TabBarController's view wasn't a direct subview of the
window, but was enclosed in some other view instead.  After placing
the view as a direct child of the window, it worked.

FWIW you can also subscribe to the orientation events directly,
something like this:

    [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];  
    [[NSNotificationCenter defaultCenter]
        addObserver:self
        selector:@selector(deviceOrientationDidChange:)
        name:@"UIDeviceOrientationDidChangeNotification"
        object:nil];

--
My info:
  Work: http://www.pandora.com/
  Play: http://www.neilmix.com/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Cantrell  
View profile  
 More options Mar 3 2009, 12:39 am
From: Paul Cantrell <cantr...@pobox.com>
Date: Mon, 2 Mar 2009 23:39:34 -0600
Local: Tues, Mar 3 2009 12:39 am
Subject: Re: shouldAutorotateToInterfaceOrientation never called
Neil —

THANK YOU. You're exactly right: the TabBarController's view must be a  
direct subview of the window.

You have saved me from an irreversible descent into madness. I owe you  
one.

P

On Mar 2, 2009, at 8:00 PM, Neil Mix wrote:

_________________________________________________________________

"After hearing ten thousand explanations, a fool is no wiser.
But an intelligent person needs only two thousand five hundred."
                                                   —Mahabharata


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Cantrell  
View profile  
 More options Mar 5 2009, 11:42 pm
From: Paul Cantrell <cantr...@pobox.com>
Date: Thu, 5 Mar 2009 22:42:59 -0600
Local: Thurs, Mar 5 2009 11:42 pm
Subject: Re: shouldAutorotateToInterfaceOrientation never called
An addendum to this, for any who are interested:

I ended up using the alternative NSNotificationCenter approach Neil  
suggested below. This stopped the different controllers belonging to  
the different tabs from fighting over whether the screen should  
rotate. To do the animation, I applied an affine transform to the  
landscape view.

This approach is worth considering if you're using a tab view  
controller — or if you want fine-grained control over the transition  
animation when the screen rotates.

Cheers, P

On Mar 2, 2009, at 11:39 PM, Paul Cantrell wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »