From e5ef299e177de83a1ccb964e777dcb20e6baf03b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Retz?= Date: Tue, 12 Jul 2011 23:17:24 -0300 Subject: [PATCH] some support to rotation -> try present notification in the first subview of window --- GKAchievementHandler.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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"]; }