Skip to content

Autorotate Tab Bar Views on iPhone.

January 27, 2010

Just a quick post to summarize an issue I ran into when trying to autorotate a view using

-(BOOL)shouldAutorotateToInterfaceOrientation:

I have a multi-view tab bar app. I’m only working on one view right now but I have stub views for the others. I hadn’t gotten around to implementing shouldAutorotateToIntervaceOrientation: in the stub ViewControllers yet. When you rotate the iPhone, even views that aren’t the active tab call shouldAutorotateToIntervaceOrientation: so if any return NO the rotate fails. By implementing the method in the remaining view controllers I was able to get autorotation working.

I then realized a better solution is to just declare the method in my root controller since all of the views implement it the same way.

Advertisements

From → iPhone

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: