diff --git a/Natives/AboutLauncherViewController.m b/Natives/AboutLauncherViewController.m index 7a3d0fec..b987ba35 100644 --- a/Natives/AboutLauncherViewController.m +++ b/Natives/AboutLauncherViewController.m @@ -64,7 +64,7 @@ [discordText sizeToFit]; [self.view addSubview:discordText]; - UITextView *discordLink = [[UITextView alloc] initWithFrame:CGRectMake(discordText.frame.size.width + 13, logoNoteView.frame.size.height + 7, (width / 2) - (discordText.frame.size.width + 13), 30.0)]; + UITextView *discordLink = [[UITextView alloc] initWithFrame:CGRectMake(discordText.frame.size.width + 15, logoNoteView.frame.size.height + 7, (width / 2) - (discordText.frame.size.width + 15), 30.0)]; discordLink.text = @"https://discord.gg/6RpEJda"; discordLink.editable = NO; discordLink.dataDetectorTypes = UIDataDetectorTypeAll; diff --git a/Natives/LoginViewController.m b/Natives/LoginViewController.m index 5e3d3e36..923afe6d 100644 --- a/Natives/LoginViewController.m +++ b/Natives/LoginViewController.m @@ -42,7 +42,8 @@ void loginAccountInput(UINavigationController *controller, int type, const char* } #pragma mark - LoginViewController -@interface LoginViewController () { +@interface LoginViewController () { +// @interface LoginViewController () { } @property (nonatomic, strong) ASWebAuthenticationSession *authVC; @end @@ -117,7 +118,7 @@ void loginAccountInput(UINavigationController *controller, int type, const char* button_accounts.backgroundColor = [UIColor colorWithRed:54/255.0 green:176/255.0 blue:48/255.0 alpha:1.0]; button_accounts.layer.cornerRadius = 5; [button_accounts setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; - [button_accounts addTarget:self action:@selector(loginAccount:) forControlEvents:UIControlEventTouchUpInside]; + [button_accounts addTarget:self action:@selector(loginAccount) forControlEvents:UIControlEventTouchUpInside]; // loginAccount: was the selector [scrollView addSubview:button_accounts]; } @@ -251,17 +252,20 @@ void loginAccountInput(UINavigationController *controller, int type, const char* [self presentViewController:offlineAlert animated:YES completion:nil]; [offlineAlert addAction:ok]; } - -- (void)loginAccount:(id)sender { +// - (void)loginAccount:(id)sender +- (void)loginAccount { LoginListViewController *vc = [[LoginListViewController alloc] init]; - vc.modalPresentationStyle = UIModalPresentationPopover; - [self presentViewController:vc animated:YES completion:nil]; - vc.preferredContentSize = CGSizeMake(320, 300); - UIPopoverPresentationController *popoverController = [vc popoverPresentationController]; - popoverController.sourceView = (UIButton *)sender; - popoverController.sourceRect = ((UIButton *)sender).bounds; // CGRectMake(self.view.frame.size.width, self.view.frame.size.width, 1, 1); - popoverController.permittedArrowDirections = UIPopoverArrowDirectionAny; - popoverController.delegate = self; + [self.navigationController pushViewController:vc animated:YES]; +/* vc.modalPresentationStyle = UIModalPresentationPopover; + * [self presentViewController:vc animated:YES completion:nil]; + * vc.preferredContentSize = CGSizeMake(320, 300); + * UIPopoverPresentationController *popoverController = [vc popoverPresentationController]; + * popoverController.sourceView = (UIButton *)sender; + * popoverController.sourceRect = ((UIButton *)sender).bounds; + * CGRectMake(self.view.frame.size.width, self.view.frame.size.width, 1, 1); + * popoverController.permittedArrowDirections = UIPopoverArrowDirectionAny; + * popoverController.delegate = self; + */ } - (void)loginMojangWithUsername:(NSString*)input_username password:(NSString*)input_password { @@ -332,10 +336,11 @@ void loginAccountInput(UINavigationController *controller, int type, const char* [self.navigationController pushViewController:vc animated:YES]; } -#pragma mark - UIPopoverPresentationControllerDelegate -- (UIModalPresentationStyle)adaptivePresentationStyleForPresentationController:(UIPresentationController *)controller traitCollection:(UITraitCollection *)traitCollection { - return UIModalPresentationNone; -} +/* #pragma mark - UIPopoverPresentationControllerDelegate + * - (UIModalPresentationStyle)adaptivePresentationStyleForPresentationController:(UIPresentationController *)controller traitCollection:(UITraitCollection *)traitCollection { + * return UIModalPresentationNone; + * } + */ #pragma mark - ASWebAuthenticationPresentationContextProviding - (ASPresentationAnchor)presentationAnchorForWebAuthenticationSession:(ASWebAuthenticationSession *)session API_AVAILABLE(ios(13.0)){