Skip to content

MXRotationManager has only one line code to help you to change iOS device orientation!

License

Notifications You must be signed in to change notification settings

michaelxiaonull/MXRotationManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MXRotationManager

MXRotationManager has only one line code to help you change device orientation!

Screenshots

UIDeviceOrientationLandscapeLeft UIDeviceOrientationLandscapeRight

How To Use

implementation delegate method below in AppDelegate.m

- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
    return [MXRotationManager defaultManager].interfaceOrientationMask;
}

UIDeviceOrientationLandscapeLeft

[MXRotationManager defaultManager].orientation = UIDeviceOrientationLandscapeLeft;

UIDeviceOrientationLandscapeRight

    [MXRotationManager defaultManager].orientation = UIDeviceOrientationLandscapeRight;

中文介绍

MXRotationManager 一行代码控制设备旋转方向

屏幕截图

UIDeviceOrientationLandscapeLeft UIDeviceOrientationLandscapeRight

如何使用

AppDelegate.m里 实现 AppDelegate 代理方法

- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
    return [MXRotationManager defaultManager].interfaceOrientationMask;
}

UIDeviceOrientationLandscapeLeft

[MXRotationManager defaultManager].orientation = UIDeviceOrientationLandscapeLeft;

UIDeviceOrientationLandscapeRight

    [MXRotationManager defaultManager].orientation = UIDeviceOrientationLandscapeRight;

About

MXRotationManager has only one line code to help you to change iOS device orientation!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published