[ios] Switching to iOS 15 as the minimum

Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
Yannik Bloscheck
2025-06-24 16:14:33 +02:00
committed by Konstantin Pastbin
parent 35cda6d342
commit 78b54acad4
22 changed files with 52 additions and 89 deletions

View File

@@ -210,6 +210,9 @@ static NSString *const kAlertControllerNibIdentifier = @"MWMAlertViewController"
- (void)displayAlert:(MWMAlert *)alert {
UIViewController *ownerVC = self.ownerViewController;
if (ownerVC.navigationController != nil) {
ownerVC = self.ownerViewController.navigationController;
}
BOOL isOwnerLoaded = ownerVC.isViewLoaded;
if (!isOwnerLoaded) {
return;
@@ -234,10 +237,19 @@ static NSString *const kAlertControllerNibIdentifier = @"MWMAlertViewController"
}
completion:nil];
[self willMoveToParentViewController:NULL];
[self.view removeFromSuperview];
[self removeFromParentViewController];
alert.alertController = self;
[ownerVC addChildViewController:self];
self.view.frame = CGRectMake(0, 0, ownerVC.view.frame.size.width, ownerVC.view.frame.size.height);
[ownerVC.view addSubview:self.view];
[self didMoveToParentViewController:ownerVC];
alert.alpha = 0.;
[self.view addSubview:alert];
CGFloat const scale = 1.1;
alert.transform = CGAffineTransformMakeScale(scale, scale);
[UIView animateWithDuration:kDefaultAnimationDuration