Re: shouldAutorotateToInterfaceOrientation not being called ...
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