From ce292d518add57edab46687485b38d3e263fb2f4 Mon Sep 17 00:00:00 2001 From: khanhduytran0 Date: Fri, 29 Jul 2022 13:27:18 +0700 Subject: [PATCH] Tweaks Added UIRequiresFullScreen for iPad Only force full navigation bar height on iPhone The Virtual mouse preference can now be set by the toggle button Use UIColor.whiteColor instead of RGB 255/255 Use arm64e-supported fishhook fork --- .gitmodules | 3 ++- Natives/Info.plist | 2 ++ Natives/LoginViewController.m | 10 +++++++--- Natives/SurfaceViewController.m | 1 + Natives/external/fishhook | 2 +- Natives/utils.m | 2 +- 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.gitmodules b/.gitmodules index 6d9db591..324d8d9e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,7 +3,8 @@ url = https://github.com/immago/DBNumberedSlider [submodule "Natives/external/fishhook"] path = Natives/external/fishhook - url = https://github.com/facebook/fishhook + url = https://github.com/khanhduytran0/fishhook + branch = jev/main [submodule "Natives/external/AFNetworking"] path = Natives/external/AFNetworking url = https://github.com/AFNetworking/AFNetworking diff --git a/Natives/Info.plist b/Natives/Info.plist index 11924bbe..87b05558 100644 --- a/Natives/Info.plist +++ b/Natives/Info.plist @@ -92,6 +92,8 @@ arm64 metal + UIRequiresFullScreen + UIStatusBarHidden UISupportedInterfaceOrientations diff --git a/Natives/LoginViewController.m b/Natives/LoginViewController.m index b7bde543..f690fe20 100644 --- a/Natives/LoginViewController.m +++ b/Natives/LoginViewController.m @@ -110,7 +110,7 @@ [button_faq addTarget:self action:@selector(showFAQ) forControlEvents:UIControlEventTouchUpInside]; if(@available (iOS 13.0, *)) { button_faq.imageView.image = [[UIImage systemImageNamed:@"doc.text"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; - [button_faq setTintColor:[UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0]]; + [button_faq setTintColor:UIColor.whiteColor]; [button_faq setImage:button_faq.imageView.image forState:UIControlStateNormal]; } [scrollView addSubview:button_faq]; @@ -144,7 +144,7 @@ } if(@available (iOS 13.0, *)) { button_login.imageView.image = [[UIImage systemImageNamed:@"person.crop.circle.badge.plus"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; - [button_login setTintColor:[UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0]]; + [button_login setTintColor:UIColor.whiteColor]; [button_login setImage:button_login.imageView.image forState:UIControlStateNormal]; } [scrollView addSubview:button_login]; @@ -166,7 +166,7 @@ [button_accounts addTarget:self action:@selector(loginAccount:) forControlEvents:UIControlEventTouchUpInside]; if(@available (iOS 13.0, *)) { button_accounts.imageView.image = [[UIImage systemImageNamed:@"person.crop.circle"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; - [button_accounts setTintColor:[UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0]]; + [button_accounts setTintColor:UIColor.whiteColor]; [button_accounts setImage:button_accounts.imageView.image forState:UIControlStateNormal]; } [scrollView addSubview:button_accounts]; @@ -182,6 +182,10 @@ } } +- (void)viewWillAppear:(BOOL)animated { + viewController = self; +} + - (void)displayProgress:(NSString *)title { self.title = title; UIActivityIndicatorViewStyle style; diff --git a/Natives/SurfaceViewController.m b/Natives/SurfaceViewController.m index 200b992c..ab6a77d9 100644 --- a/Natives/SurfaceViewController.m +++ b/Natives/SurfaceViewController.m @@ -876,6 +876,7 @@ int currentVisibility = 1; if (!isGrabbing && !held) { virtualMouseEnabled = !virtualMouseEnabled; self.mousePointerView.hidden = !virtualMouseEnabled; + setPreference(@"virtmouse_enable", @(virtualMouseEnabled)); } break; diff --git a/Natives/external/fishhook b/Natives/external/fishhook index 8ef82f07..27bedb2a 160000 --- a/Natives/external/fishhook +++ b/Natives/external/fishhook @@ -1 +1 @@ -Subproject commit 8ef82f0711494ecc78d16bf6ce76f5ad92e5f67b +Subproject commit 27bedb2ab670cc51d7be06d538b249564b47cfbf diff --git a/Natives/utils.m b/Natives/utils.m index 0649d692..b0db7a11 100644 --- a/Natives/utils.m +++ b/Natives/utils.m @@ -11,7 +11,7 @@ // This forces the navigation bar to keep its height (44dp) in landscape @implementation UINavigationBar(forceFullHeightInLandscape) - (BOOL)forceFullHeightInLandscape { - return YES; + return UIScreen.mainScreen.traitCollection.userInterfaceIdiom == UIUserInterfaceIdiomPhone; } @end