mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[ios] Switching to iOS 15 as the minimum
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
35cda6d342
commit
78b54acad4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user