Skip to content

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

Open

Description

@JzwOnly
No description provided.

Activity

  1. CoderMikeHe commented on Dec 12, 2019

    @CoderMikeHe
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions