Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

uaecasher

macrumors 65816
Original poster
Jan 29, 2009
1,289
0
Stillwater, OK
hello,

I'm trying to add support for orientation for my app but it's not working, I've tried this code with my other app and it's working just fine, my app is tabbar app (the one which isn't working), here is the code:

Code:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return YES;
}
 
I've added them into all the view controllers

You may want to put some NSLogs as the first statement in every/most/some of the methods in every/most/some of your classes. Then you can see if 1) the shouldAutorotate method is getting called but you're setting it wrong; or 2) if it's not getting called at all. If it's not getting called (which I suspect is what's going on), you can look at the NSLogs to see which object is getting the messages. At that point you can either put the shouldAutorotate in that object or figure out why your view controllers aren't getting their shouldAutorotate methods called.

Crude, but for tracing which method gets called by the application loop and when, it's effective.
 
You may want to put some NSLogs as the first statement in every/most/some of the methods in every/most/some of your classes....
Crude, but for tracing which method gets called by the application loop and when, it's effective.

Nothing crude about logging to the console. Every developer I know does this all over in their code. Great suggestion.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.