Permalink
Browse files

fixed issue #100 where it's possible that another class than a UIView…

…Controller will be returned
  • Loading branch information...
1 parent 97098b8 commit b2283f635d8b96f310cd65f5b0ca09bae180b35a @LeonS LeonS committed Feb 15, 2013
Showing with 9 additions and 1 deletion.
  1. +9 −1 Appirater.m
View
@@ -387,7 +387,15 @@ + (id)getRootViewController {
}
}
- return [[[window subviews] objectAtIndex:0] nextResponder];
+ for (UIView *subView in [window subviews])
+ {
+ UIResponder *responder = [subView nextResponder];
+ if([responder isKindOfClass:[UIViewController class]]) {
+ return responder;
+ }
+ }
+
+ return nil;
}
+ (void)rateApp {

0 comments on commit b2283f6

Please sign in to comment.