Merge pull request #19 from diederich/develop

fix UIActionSheet rotation when presented modally
This commit is contained in:
Andreas Linde 2012-12-03 17:02:59 -08:00
commit 4b614da47b

View File

@ -269,16 +269,21 @@
} }
- (UIView*) viewForShowingActionSheetOnPhone { - (UIView*) viewForShowingActionSheetOnPhone {
if(self.view.window.rootViewController) { //find the topmost presented viewcontroller
//try to show it in the rootviewcontroller's view //and use its view
//so it covers the UITabBar or works if this UIViewController* topMostPresentedViewController = self.view.window.rootViewController;
//controller is inside a UIScrollView while(topMostPresentedViewController.presentedViewController) {
return self.view.window.rootViewController.view; topMostPresentedViewController = topMostPresentedViewController.presentedViewController;
} else { }
UIView* view = topMostPresentedViewController.view;
if(nil == view) {
//hope for the best. Should work //hope for the best. Should work
//on simple view(controller) hierarchies //on simple view(controller) hierarchies
return self.view; view = self.view;
} }
return view;
} }
#pragma mark - BITFeedbackUserDataDelegate #pragma mark - BITFeedbackUserDataDelegate