我在解雇PopOverViewController时会出现黑色闪烁屏幕。
ViewController.swift中的代码
if segue.identifier == "addComment"
{
let controller = segue.destinationViewController as! ProfileCommentPopOver
controller.popoverPresentationController?.delegate = self
controller.preferredContentSize = CGSizeMake(250, 150)
controller.fetchedProfileID = sendToUserID
}
PopOverViewController.swift
@IBAction func addCommentAction(sender: UIButton)
{
self.dismissViewControllerAnimated(true, completion: nil)
}
答案 0 :(得分:0)
试
@IBAction func addCommentAction(sender: UIButton)
{
self.dismiss(animated: true, completion:{})
}