mirror of
https://github.com/SoPat712/YTLitePlus.git
synced 2025-08-22 02:58:45 -04:00
Remove Deprecated Code (Fullscreen to the Right)
UI_USER_INTERFACE_IDIOM() was the wrong Idiom and was deprecated, I am sorry for using the incorrect Device Type Checker 😅
This commit is contained in:
@@ -436,20 +436,20 @@ BOOL isTabSelected = NO;
|
|||||||
%group gFullscreenToTheRight
|
%group gFullscreenToTheRight
|
||||||
%hook YTWatchViewController
|
%hook YTWatchViewController
|
||||||
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
|
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
|
||||||
if ([self isFullscreen] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
if ([self isFullscreen] && [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
|
||||||
return UIInterfaceOrientationLandscapeRight;
|
return UIInterfaceOrientationLandscapeRight;
|
||||||
}
|
}
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
|
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
|
||||||
if ([self isFullscreen] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
if ([self isFullscreen] && [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
|
||||||
return UIInterfaceOrientationMaskLandscape;
|
return UIInterfaceOrientationMaskLandscape;
|
||||||
}
|
}
|
||||||
return %orig;
|
return %orig;
|
||||||
}
|
}
|
||||||
%new
|
%new
|
||||||
- (void)forceRightFullscreenOrientation {
|
- (void)forceRightFullscreenOrientation {
|
||||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
|
||||||
NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationLandscapeRight];
|
NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationLandscapeRight];
|
||||||
[[UIDevice currentDevice] setValue:value forKey:@"orientation"];
|
[[UIDevice currentDevice] setValue:value forKey:@"orientation"];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user