kanmani
kanmani

Reputation: 669

UIInterfaceOrientation rotate along with the Hearder

When I rotate the simulator from portrait to landscape, the header is not rotating. I want to rotate the header along with the view rotation using UIInterfaceOrientation.enter image description here

Upvotes: 2

Views: 275

Answers (1)

Robin
Robin

Reputation: 10011

@renuga i think you need to implement this method in your view controller.

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
    if(toInterfaceOrientation == UIInterfaceOrientationLandscapeRight)
        return YES;
    if(toInterfaceOrientation == UIInterfaceOrientationPortrait)
        return YES;
    return NO;
}

go to IB and click on the arrow shown below.

enter image description here

and there you need to adjust the position of your tab bar

Upvotes: 1

Related Questions