• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: shouldAutorotateToInterfaceOrientation not being called ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shouldAutorotateToInterfaceOrientation not being called ...


  • Subject: Re: shouldAutorotateToInterfaceOrientation not being called ...
  • From: Jay Reynolds Freeman <email@hidden>
  • Date: Sun, 25 Jul 2010 05:21:44 -0700

On Jul 25, 2010, at 3:01 AM, Roland King wrote:

> First off - post that piece of code, cut and paste it right out of the app just incase you went and misspelled it, unlikely but, if you post it here we can eliminate that possibility.

This code shows instrumentation to report the method call both in the console log (NSLog) and
in a separate log file (just in case).  I have tried it without the log file, so it is not
something to do with the log file that is the problem.  This is the code as implemented in
my app's one and only view controller.

// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    extern FILE *logFile;
    fprintf( logFile, "Asking about autorotate\n"); fflush( logFile );  // DEBUG
    NSLog(@"Asking about autorotate");  // DEBUG
    return YES;
    }

> Second - type 'QA1688' into the documentation browser and read that technote, that gives several reasons that views might not autorotate, there are some quite creative ones there like not retaining a view controller properly or not calling [ super init... ];

I have only one view controller, it is declared
@property (nonatomic, retain) IBOutlet PixieSchemeIIIController *viewController;
I temporarily added an extra retain for the controller, just to make sure.  No help.  And I double-checked that I was
calling [super init] in my init method.

> and lastly yes there is a property, it's discussed in QA1588, make sure that UISupportedInterfaceOrientations and UIInterfaceOrientation in your Info.plist file are suitably set; although I've messed with that key before (and just did again to check) and my app rotated anyway so I really don't actually know if it works!

UISupportedInterfaceOrientations comes up in the plist editor as a list of all four possibilities; UIInterfaceOrientation is not present in the plist.


Does anyone know just what object is sent the "shouldAutorotateToInterfaceOrientation" method, and how the OS or framework determines where to send it?  I suspect that information might help a lot in figuring out what the problem is.


--  Jay Reynolds Freeman
---------------------
email@hidden
http://web.mac.com/jay_reynolds_freeman (personal web site)


On 25-Jul-2010, at 4:35 PM, Jay Reynolds Freeman wrote:

> I posted about this in the CocoaTouch developer forum, with no
> response.  I am bringing my problem here in the forlorn, last hope
> that someone who reads this newsgroup but not that forum knows
> something that will assist me...

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >shouldAutorotateToInterfaceOrientation not being called ... (From: Jay Reynolds Freeman <email@hidden>)
 >Re: shouldAutorotateToInterfaceOrientation not being called ... (From: Roland King <email@hidden>)

  • Prev by Date: Re: shouldAutorotateToInterfaceOrientation not being called ...
  • Next by Date: OT?: Spinning Ball Animation in ABCNews iPad app - New CoreAnimation feature?
  • Previous by thread: Re: shouldAutorotateToInterfaceOrientation not being called ...
  • Next by thread: Re: shouldAutorotateToInterfaceOrientation not being called ...
  • Index(es):
    • Date
    • Thread