【发布时间】:2016-09-09 15:49:13
【问题描述】:
在 iOS9 中,当我使用 UIPopoverPresentationController 旋转屏幕时,坐标会重置为 0,并且不会附加到作为按钮的 sourceView。
我试过了:
func popoverPresentationController(popoverPresentationController: UIPopoverPresentationController, willRepositionPopoverToRect rect: UnsafeMutablePointer, inView 视图: AutoreleasingUnsafeMutablePointer) { rect.initialize(CGRectMake(200, 200, 400, 400)) }
但无济于事。有什么帮助吗?
【问题讨论】:
-
rect.initialize(CGRectMake(200, 200, 400, 400)真的吗?如果那是你的代码,难怪什么都没有发生。
标签: ios swift uipopovercontroller