iOS开发 点击某处横屏竖屏切换

typedef NS_ENUM(NSInteger, UIInterfaceOrientation) {

    UIInterfaceOrientationUnknown            = UIDeviceOrientationUnknown,

    UIInterfaceOrientationPortrait           = UIDeviceOrientationPortrait,

    UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown,

    UIInterfaceOrientationLandscapeLeft      = UIDeviceOrientationLandscapeRight,

    UIInterfaceOrientationLandscapeRight     = UIDeviceOrientationLandscapeLeft

} __TVOS_PROHIBITED;

 

[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight];

  [self orientationChange:YES];

posted @ 2016-12-29 14:57  D-Ben  阅读(356)  评论(0编辑  收藏  举报