Created
July 23, 2015 20:39
-
-
Save steipete/72e4370c6de1ff410a70 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is more hacky than it should be! | |
- (UIModalPresentationStyle)pspdf_currentPresentationStyle { | |
UIViewController *vc = self.presentedViewController.presentingViewController; | |
if (vc.traitCollection.horizontalSizeClass == UIUserInterfaceSizeClassCompact) { | |
UIModalPresentationStyle style = self.adaptivePresentationStyle; | |
if (style != UIModalPresentationNone) { | |
return style; | |
} | |
} | |
return self.presentationStyle; | |
} | |
- (BOOL)pspdf_isPopover { | |
return self.pspdf_currentPresentationStyle == UIModalPresentationPopover; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fixed for iPhone 6 Plus in landscape (where popover presentations adapt to sheets) in my fork.