Skip to content

Commit

Permalink
change
Browse files Browse the repository at this point in the history
  • Loading branch information
DickyWoo committed Aug 22, 2017
1 parent 15177ac commit a019f44
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions DWBasicAlertAction/DWBasicAlertAction.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// 弹窗显示工具

#import "DWBasicAlertAction.h"
//#import "AppDelegate.h"
#import <objc/runtime.h>

@implementation DWBasicAlertAction
Expand Down Expand Up @@ -142,8 +141,6 @@ + (UIViewController *)getPresentViewController {
因为UIAlertController的出现,是生成了一个新的window,然后添加在界面上
这个时候获取到的keyWindow就是UIAlertControllerShimPresenterWindow
获取到的rootViewController就会是UIApplicationRotationFollowingController */
// AppDelegate *appdelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
// UIViewController *topController = appdelegate.window.rootViewController;
UIViewController *topController = [[[UIApplication sharedApplication] keyWindow] rootViewController];

// Getting topMost ViewController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// 弹窗显示工具

#import "DWBasicAlertAction.h"
//#import "AppDelegate.h"
#import <objc/runtime.h>

@implementation DWBasicAlertAction
Expand Down Expand Up @@ -142,8 +141,6 @@ + (UIViewController *)getPresentViewController {
因为UIAlertController的出现,是生成了一个新的window,然后添加在界面上
这个时候获取到的keyWindow就是UIAlertControllerShimPresenterWindow
获取到的rootViewController就会是UIApplicationRotationFollowingController */
// AppDelegate *appdelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
// UIViewController *topController = appdelegate.window.rootViewController;
UIViewController *topController = [[[UIApplication sharedApplication] keyWindow] rootViewController];

// Getting topMost ViewController
Expand Down

0 comments on commit a019f44

Please sign in to comment.