diff --git a/GKAchievementHandler.m b/GKAchievementHandler.m index 192e5ca..e6afc30 100644 --- a/GKAchievementHandler.m +++ b/GKAchievementHandler.m @@ -60,7 +60,13 @@ - (id)init self = [super init]; if (self != nil) { - _topView = [[UIApplication sharedApplication] keyWindow]; + UIWindow *w = [[UIApplication sharedApplication] keyWindow]; + if ([w.subviews count] > 0) { + _topView = [w.subviews objectAtIndex:0]; + } else { + _topView = w; + } + _queue = [[NSMutableArray alloc] initWithCapacity:0]; self.image = [UIImage imageNamed:@"gk-icon.png"]; }