I am using this to set device orientation,
[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight];
but it is throwing a warning:
Implicit Conversion from enumeration type “UIInterfaceOrientation” to different enumeration type “UIPrintInfoOrientation”
Plus there is a problem which I assume is occurring due to that warning is that when I run the app, the simulator launches but remains black and app doesn’t runs, and it says “Attaching to ‘aap name'”, and nothing happens, now I want to set device orientation for certain views please. guide me, is there any way or work around to do it?
I think you should be using:
to inform each of your app’s view controllers of the accepted device orientation(s), e.g.