, , .
UIWindow - , UIWindow - ! , . :
method : windowDidBecomeVisibleNotification:
object -> <SKStoreReviewPresentationWindow: 0x7fe14bc03670; baseClass = UIApplicationRotationFollowingWindow; frame = (0 0; 414 736); opaque = NO; gestureRecognizers = <NSArray: 0x61800004de30>; layer = <UIWindowLayer: 0x61800003baa0>>
, , , object, :
- (void)viewDidLoad {
[super viewDidLoad];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(windowDidBecomeVisibleNotification:)
name:UIWindowDidBecomeVisibleNotification
object:nil];
}
- (void)windowDidBecomeVisibleNotification:(NSNotification *)notification {
if ([notification.object isKindOfClass:NSClassFromString(@"SKStoreReviewPresentationWindow")]) {
NSLog(@"the review request was shown!");
}
}
, SKStoreReviewPresentationWindow , [SKStoreReviewPresentationWindow class], NSClassFromString - - . , , UIWindowDidResignKey, - , , , , . , . , , notification.object [UIApplication sharedApplication].window, - UITextEffectsWindow UIRemoteKeyboardWindow, , .
- Apple, . , , . iPhone 7+ Simulator, iOS 10.3, Xcode 8.3.2
, , , , , . -, -, . , , . , , , , Apple .