Gremlin in the tab button

77 Views Asked by At

I'm new to Objective C and Xcode. I'm building an iPad app, the best that I can.

But I'm currently stuck.

I have a tabbed app, with 3 buttons at the bottom. They all work. I want to add a new button. But every time I use Interface Builder to add a button to my tab bar, or even move the buttons around the tab bar, I then go into the Simulator and it turns out that I've lost my ability to change orientation. The view is stuck in portrait. If I delete the new button, or undo the move, then I regain my powers of orientation.

What could be causing this?

1

There are 1 best solutions below

4
On

You need to specify the new ViewController is able to rotate, if one can't then the whole app won't with a TabBar.

- (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return YES;
}