landscape limitation test
This commit is contained in:
1 parent
06aa772a02
commit
565e31983c
2 files changed
+27
-11
No files matched your search
+15
-9
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "AppDelegate.h"
|
#import "AppDelegate.h"
|
||||||
|
#import "MainFrameViewController.h"
|
||||||
|
|
||||||
@implementation AppDelegate
|
@implementation AppDelegate
|
||||||
|
|
||||||
@@ -22,17 +23,22 @@ static NSString* DB_NAME = @"Moonlight_tvOS.bin";
|
|||||||
static NSString* DB_NAME = @"Limelight_iOS.sqlite";
|
static NSString* DB_NAME = @"Limelight_iOS.sqlite";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
|
||||||
#if !TARGET_OS_TV
|
|
||||||
UIApplicationShortcutItem* shortcut = [launchOptions valueForKey:UIApplicationLaunchOptionsShortcutItemKey];
|
|
||||||
if (shortcut != nil) {
|
|
||||||
_pcUuidToLoad = (NSString*)[shortcut.userInfo objectForKey:@"UUID"];
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return YES;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if !TARGET_OS_TV
|
#if !TARGET_OS_TV
|
||||||
|
// orietation limitatioin test
|
||||||
|
/*- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
|
||||||
|
UIViewController *topController = window.rootViewController;
|
||||||
|
while (topController.presentedViewController) {
|
||||||
|
topController = topController.presentedViewController;
|
||||||
|
}
|
||||||
|
return [topController supportedInterfaceOrientations];
|
||||||
|
}*/
|
||||||
|
|
||||||
|
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
|
||||||
|
return UIInterfaceOrientationMaskLandscape;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
- (void)application:(UIApplication *)application performActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem completionHandler:(void (^)(BOOL succeeded))completionHandler {
|
- (void)application:(UIApplication *)application performActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem completionHandler:(void (^)(BOOL succeeded))completionHandler {
|
||||||
_pcUuidToLoad = (NSString*)[shortcutItem.userInfo objectForKey:@"UUID"];
|
_pcUuidToLoad = (NSString*)[shortcutItem.userInfo objectForKey:@"UUID"];
|
||||||
_shortcutCompletionHandler = completionHandler;
|
_shortcutCompletionHandler = completionHandler;
|
||||||
|
|||||||
@@ -892,6 +892,13 @@ static NSMutableSet* hostList;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
|
||||||
|
// Return the supported interface orientations based on the current state
|
||||||
|
NSLog(@"orchange test");
|
||||||
|
return UIInterfaceOrientationMaskLandscape;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
- (void)handleOrientationChange {
|
- (void)handleOrientationChange {
|
||||||
double delayInSeconds = 0.7;
|
double delayInSeconds = 0.7;
|
||||||
// Convert the delay into a dispatch_time_t value
|
// Convert the delay into a dispatch_time_t value
|
||||||
@@ -903,6 +910,9 @@ static NSMutableSet* hostList;
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)revealController:(SWRevealViewController *)revealController didMoveToPosition:(FrontViewPosition)position {
|
- (void)revealController:(SWRevealViewController *)revealController didMoveToPosition:(FrontViewPosition)position {
|
||||||
|
[self setNeedsUpdateOfSupportedInterfaceOrientations];
|
||||||
|
|
||||||
|
|
||||||
// If we moved back to the center position, we should save the settings
|
// If we moved back to the center position, we should save the settings
|
||||||
SettingsViewController* settingsViewController = (SettingsViewController*)[revealController rearViewController];
|
SettingsViewController* settingsViewController = (SettingsViewController*)[revealController rearViewController];
|
||||||
settingsViewController.mainFrameViewController = self;
|
settingsViewController.mainFrameViewController = self;
|
||||||
@@ -1004,10 +1014,10 @@ static NSMutableSet* hostList;
|
|||||||
|
|
||||||
- (void)viewDidLoad
|
- (void)viewDidLoad
|
||||||
{
|
{
|
||||||
[OrientationHelper updateOrientationToLandscape];
|
//[OrientationHelper updateOrientationToLandscape];
|
||||||
|
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
[self attachWaterMark];
|
[self attachWaterMark];
|
||||||
|
|
||||||
#if !TARGET_OS_TV
|
#if !TARGET_OS_TV
|
||||||
_settingsExpandedInStreamView = false; // init this flag
|
_settingsExpandedInStreamView = false; // init this flag
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user