如何解除外部水龙头上的模态视图表单控制器?

时间:2015-10-03 12:22:29

标签: ios popover dismiss

如何在外部点击时关闭模态视图表单控制器?

@IBAction func btnAction(sender: AnyObject) {

    let storyboard = UIStoryboard(name: "Main", bundle: nil)

    let vc = storyboard.instantiateViewControllerWithIdentifier("popoverID") as! PopoverViewController

    vc.modalPresentationStyle = .FormSheet
    vc.popoverPresentationController?.sourceView = self.view

    self.presentViewController(vc, animated: true, completion: nil)
}

0 个答案:

没有答案