mirror of
https://github.com/copyrighttxt/watrbx-game-engine.git
synced 2026-09-05 05:07:48 +00:00
GEEKING
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// NonRotatableViewController.m
|
||||
// -A subclass of UIViewController to prevent the screen from rotating
|
||||
// RobloxMobile
|
||||
//
|
||||
// Created by Kyler Mulherin on 3/10/15.
|
||||
// Copyright (c) 2015 ROBLOX. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NonRotatableViewController.h"
|
||||
|
||||
@interface NonRotatableViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation NonRotatableViewController
|
||||
|
||||
|
||||
#ifdef __IPHONE_9_0
|
||||
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
|
||||
#else
|
||||
- (NSUInteger)supportedInterfaceOrientations
|
||||
#endif
|
||||
{
|
||||
switch ([UIDevice currentDevice].userInterfaceIdiom)
|
||||
{
|
||||
case UIUserInterfaceIdiomPad: return UIInterfaceOrientationMaskLandscape;
|
||||
case UIUserInterfaceIdiomPhone: return UIInterfaceOrientationMaskPortrait;
|
||||
case UIUserInterfaceIdiomUnspecified: return UIInterfaceOrientationMaskPortrait;
|
||||
default: return UIInterfaceOrientationMaskPortrait;
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)shouldAutorotate
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user