tags:

views:

202

answers:

2

Hey Guys,

I have 2 view controllers, when the app is in the firstview the orignal view the uiorientation works fine but when I swtch the view and come back to the first view the uiorientation doesn't work. I tried to make the firstview becmefirstresponder but no luck.

What can I do to fix thus issue?

A: 

Did you try implementing the - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation method in your view controller?

For example, for a landscape orientation:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
Dimitris
yes i have that method and it is returning yes
harekam_taj
A: 

You have to add an extra line to your Info.plist:

Key:UIInterfaceOrientation Value:UIInterfaceOrientationLandscapeRight;

then only this will start working.

Hope this helps.

Madhup