Matrix
Matrix

Reputation: 7613

iPad orientation problem

In application i want to support only UIInterfaceOrientationLandscapeRight. So i have done two things for that. 1) Set Initial interface Orientation to UIInterfaceOrientationLandscapeRight in proj plist file. 2) writeen this code in each view controller. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return(interfaceOrientation==UIInterfaceOrientationLandscapeRight); }

But when I switch to another view using removeFromSuperview and addSubview methods to replace the old view with the new view the new view is not oriented properly.

      How to solve this problem ???

Upvotes: 0

Views: 95

Answers (1)

Amit Singh
Amit Singh

Reputation: 8383

Go to your project's info.plist (this file would be in Resources folder) and add these two field

I hope you know how to add fields

You just need to add keys in left and the possible values will appear in right

Upvotes: 2

Related Questions