This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
80 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// WPSAlertController.h | ||
// WPSKit | ||
// | ||
// Created by Kirby Turner on 9/26/15. | ||
// Copyright © 2015 White Peak Software, Inc. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface WPSAlertController : UIAlertController | ||
|
||
- (void)show; | ||
- (void)showAnimated:(BOOL)animated; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// | ||
// WPSAlertController.m | ||
// WPSKit | ||
// | ||
// Created by Kirby Turner on 9/26/15. | ||
// Copyright © 2015 White Peak Software, Inc. All rights reserved. | ||
// | ||
|
||
#import "WPSAlertController.h" | ||
|
||
@interface WPSAlertController () | ||
@property (nonatomic, strong) UIWindow *alertWindow; | ||
@end | ||
|
||
@implementation WPSAlertController | ||
|
||
- (void)viewDidLoad | ||
{ | ||
[super viewDidLoad]; | ||
// Do any additional setup after loading the view. | ||
} | ||
|
||
- (void)viewDidDisappear:(BOOL)animated | ||
{ | ||
[super viewDidDisappear:animated]; | ||
[[self alertWindow] setHidden:YES]; | ||
[self setAlertWindow:nil]; | ||
} | ||
|
||
- (void)show | ||
{ | ||
[self showAnimated:YES]; | ||
} | ||
|
||
- (void)showAnimated:(BOOL)animated | ||
{ | ||
UIViewController *blankViewController = [[UIViewController alloc] init]; | ||
[[blankViewController view] setBackgroundColor:[UIColor clearColor]]; | ||
|
||
UIWindow *window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | ||
[window setRootViewController:blankViewController]; | ||
[window setBackgroundColor:[UIColor clearColor]]; | ||
[window setWindowLevel:UIWindowLevelAlert + 1]; | ||
[window makeKeyAndVisible]; | ||
[self setAlertWindow:window]; | ||
|
||
[blankViewController presentViewController:self animated:animated completion:nil]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters