sammcewan / WYPopoverController

WYPopoverController is for the presentation of content in popover on iPhone / iPad devices. Very customizable.
Other
252 stars 74 forks source link

Fixed iOS 8 issue with arrow direction #56

Closed thunderweasel closed 9 years ago

thunderweasel commented 9 years ago

Currently, the calculation for the available view size for the popover compensates for orientation in a way that is unnecessary on iOS 8, since the view has already been rotated according to device orientation.

This fixes that.

sammcewan commented 9 years ago

This looks good. However, the library supports iOS 7 too. Suggest introducing this inside a check if there are any regressions.

thunderweasel commented 9 years ago

For what it's worth, the app that we're developing also supports iOS 7 and this calculation appears to function correctly for us on both 7 and 8. It should be doing the exact same thing as before on iOS 7, since the _ignoreOrientation flag is only YES on iOS 8.

Without this fix, it's a little buggy on iOS 8 in that it can choose arrow directions that force the popover to be compressed beyond the preferredContentSize, even if there's plenty of room in another direction.

dtrotzjr commented 9 years ago

:+1: