mirror of
https://github.com/YTLitePlus/YTLitePlus.git
synced 2026-01-11 22:40:20 +00: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:
parent
0d600a2650
commit
6b78aba609
1 changed files with 3 additions and 3 deletions
|
|
@ -436,20 +436,20 @@ BOOL isTabSelected = NO;
|
|||
%group gFullscreenToTheRight
|
||||
%hook YTWatchViewController
|
||||
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
|
||||
if ([self isFullscreen] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
||||
if ([self isFullscreen] && [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
|
||||
return UIInterfaceOrientationLandscapeRight;
|
||||
}
|
||||
return %orig;
|
||||
}
|
||||
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
|
||||
if ([self isFullscreen] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
||||
if ([self isFullscreen] && [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
|
||||
return UIInterfaceOrientationMaskLandscape;
|
||||
}
|
||||
return %orig;
|
||||
}
|
||||
%new
|
||||
- (void)forceRightFullscreenOrientation {
|
||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
||||
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
|
||||
NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationLandscapeRight];
|
||||
[[UIDevice currentDevice] setValue:value forKey:@"orientation"];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue