Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问 如何在某个页面 强制横屏呢 #17

Open
JzwOnly opened this issue Dec 12, 2019 · 1 comment
Open

请问 如何在某个页面 强制横屏呢 #17

JzwOnly opened this issue Dec 12, 2019 · 1 comment

Comments

@JzwOnly
Copy link

JzwOnly commented Dec 12, 2019

No description provided.

@CoderMikeHe
Copy link
Owner

MHViewController.m 里面重写了
#pragma mark - Orientation

  • (UIInterfaceOrientationMask)supportedInterfaceOrientations {return UIInterfaceOrientationMaskPortrait;}
  • (BOOL)shouldAutorotate {return YES;}
  • (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {return UIInterfaceOrientationPortrait;}

#pragma mark - Status bar

  • (BOOL)prefersStatusBarHidden { return NO; }
  • (UIStatusBarStyle)preferredStatusBarStyle { return UIStatusBarStyleLightContent; }
  • (UIStatusBarAnimation)preferredStatusBarUpdateAnimation { return UIStatusBarAnimationFade; }
    你可以在你想要的页面重写这几个方法即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants