AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
UIView *view = [delegate window];
AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
UIView *view = [delegate window];
转载于:https://my.oschina.net/potato512/blog/647826