ios8 - iOS 8 - UIPopoverPresentationController moving popover -


i looking effective way re-position popover using new uipopoverpresentationcontroller. have succesfully presented popover, , want move without dismissing , presenting again. having trouble using function:

(void)popoverpresentationcontroller:(uipopoverpresentationcontroller *)popoverpresentationcontroller       willrepositionpopovertorect:(inout cgrect *)rect                            inview:(inout uiview **)view 

i know it's in game, has example of how efficiently grateful if shared me. in advance.

unfortunately hacky workaround solution i've found:

[vc.popoverpresentationcontroller setsourcerect:newsourcerect]; [vc setpreferredcontentsize:cgrectinset(vc.view.frame, -0.01, 0.0).size]; 

this temporarily changes content size of presented view, causing popover , arrow repositioned. temporary change in size not visible.

it seems problem apple need fix - changing sourceview or sourcerect properties of uipopoverpresentationcontroller nothing when it's presenting popover (without workaround).

hope works too!


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -