I am working on an application in which using settings options i want user to choose his own preferred orientation for app be it portait,landscape or both...i want to save his preferred orientation & only allow user preferred orientation there after...if it's possible,how can i achieve this? thanks in advance..
Asked
Active
Viewed 52 times
1
-
Refer the below link to change the orientaion. http://stackoverflow.com/questions/11109662/iphone-set-interfaceorientation-programatically – Neha Gupta Nov 30 '15 at 12:17
1 Answers
0
Use the below code to change the orientation manually,
[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight];
save the orientation in nsuserdefaults like below,
[[NSUserDefaults standardUserDefaults] setValue:@"portrait" forKey:@"orientation"];
-
@ravinder singh this link will help you "http://stackoverflow.com/questions/12615114/how-to-change-the-orientation-of-the-app-without-changing-the-device-orientation" – satheesh Nov 30 '15 at 11:52