Skip to content

About

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

Topics

Resources

Stars

13 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

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

Stars

13 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages