0
我有一個按鈕,當我單擊該窗口時彈出視圖出現。如圖所示,箭頭標記出現在屏幕的頂部中央。如何將UIPopoverArrowDirection定位到彈出窗口視圖的頂部右側
@IBAction func notifyBtnTapped(sender: AnyObject) {
var vieww: notificationViewController = self.storyboard?.instantiateViewControllerWithIdentifier("popover") as! notificationViewController
vieww.modalPresentationStyle = .Popover
vieww.preferredContentSize = CGSizeMake(320, 602)
var vvv = vieww.popoverPresentationController
vvv?.delegate = self
vvv?.sourceView = self.view
vvv?.sourceRect = CGRect(x: 700, y: -510, width: 320, height: 602)
vvv?.permittedArrowDirections = [.Up]
presentViewController(vieww, animated: true, completion: nil)
}
但如何把箭頭標記的酥料餅的視圖的右上方?提前致謝。