Harikant Jammi
Harikant Jammi

Reputation: 298

iOS 8 popoverpresentationcontroller popoverlayoutmargin not working

I am using the new popOverPresentationController to present UIPopOverController in iOS 8. I set the popOverLayoutMargins with a value like {65.0, 10.0, 45.0, 10.0}. But these do not reflect when I present the popOverController. This used to work perfectly on iOS 7. Is this broken on ios 8?

Regards, Harikant Jammi

Upvotes: 20

Views: 2757

Answers (2)

MichaelMao
MichaelMao

Reputation: 571

It works on iOS 13 now.

I guess the arrow point origin maybe follow this expressions

let xRatio = (permittedArrowDirections is horizonal) ? 1/2 : 1
let yRatio = (permittedArrowDirections is vertical) ? 1/2 : 1

x =  sourceRect.origin.x + sourceRect.size.width * xRatio + popoverLayoutMargins.left
y =  sourceRect.origin.y + sourceRect.size.height * yRatio + popoverLayoutMargins.top

Upvotes: 0

Oleg Gordiichuk
Oleg Gordiichuk

Reputation: 15512

It is an Apple bug which has not yet been fixed. References to the bug can be found in this example code and on the Apple developer forums.

There is currently no clear workaround for this issue. A bug report with ID 18392444 has been filed with Apple.

Upvotes: 16

Related Questions