(IOS)设置屏幕方向

NSNumber *orientationTarget = [NSNumber numberWithInt:UIInterfaceOrientationLandscapeLeft];

[[UIDevice currentDevice] setValue:orientationTarget forKey:@"orientation"];

[UIViewController attemptRotationToDeviceOrientation];

你可能感兴趣的:((IOS)设置屏幕方向)