AMH
AMH

Reputation: 6451

Application doesn't oriented

My application doesn't oriented even if I use

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Override to allow orientations other than the default portrait orientation.
    return YES;
}

the only thing I do is to hide the lower tab bar using

SearchScreen.hidesBottomBarWhenPushed = YES ;

Any idea how to fix that

Upvotes: 3

Views: 83

Answers (2)

dom
dom

Reputation: 11972

Some ideas:

  • Are the "Supported Device Orientations" set properply?
  • Maybe a parent ViewController is not allowing interface orientation?
  • If testing on a device: Is it "orientation locked"?

Setting 'Supported Device Orientations' inside Info.plist:

<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
</array>

Upvotes: 2

NSCry
NSCry

Reputation: 1652

Please write
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Override to allow orientations other than the default portrait orientation. return YES; }

in all your tab bar's root view controller.

Can you tell me your which one is root view controller that tab view controller??

Upvotes: 0

Related Questions