0

I want to have landscape orientation for my app. So I have done the following: *in Info.plist file I've set this: allt text

And then in every ViewController.m of my application I've done this:

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

    else return NO;
}

And well this is the result: allt text

What should I do for the tabel to look right.Thanks

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
adrian
  • 4,574
  • 17
  • 68
  • 119
  • refer this link it may be help u. http://stackoverflow.com/questions/7369381/detect-iphone-orientation-before-loading-tableview – banu Nov 04 '11 at 10:53
  • I think this can help you: [iPhone SDK: Orientation (Landscape and Portrait views)][1] [1]: http://stackoverflow.com/questions/431165/iphone-sdk-orientation-landscape-and-portrait-views – Sr.Richie Nov 04 '11 at 11:22
  • Nothing works.Tried everything:) – adrian Nov 04 '11 at 11:31

1 Answers1

0

Your looking in the wrong place: in your RootViewController.m file look for the following code:

#elif GAME_AUTOROTATION == kGameAutorotationUIViewController
//
//lots of useless comments
//
return (UIInterfaceOrientationIsPortrait(interfaceOrientation) ); //THIS LINE HERE
//Change it to say this:
//return (UIInterfaceOrientationIsLandScape(interfaceOrientation) );

the line that says return (UIInterface... Portrait) is the line that determines your app's rotating capabilities. You can change this to whatever to allow you to be able to rotate completely, keep it at a certain orientation, or whatever you desire...

Gabriel
  • 3,039
  • 6
  • 34
  • 44