1
我創建了一個彈出窗口,但沒有任何顯示,我添加UIViewControllers作爲彈出窗口。爲什麼它不起作用? http://puu.sh/hreL9/75081b2a90.png爲什麼消息不顯示?
class interestViewController: UIViewController, UIPopoverPresentationControllerDelegate {
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "popoverSegue" {
let interestViewController = segue.destinationViewController as! UIViewController
interestViewController.modalPresentationStyle = UIModalPresentationStyle.Popover
interestViewController.popoverPresentationController!.delegate = self
}
}
func adaptivePresentationStyleForPresentationController(controller: UIPresentationController) -> UIModalPresentationStyle {
return UIModalPresentationStyle.None
}
如何將文本或圖片添加到彈出窗口? – tanman
我將如何啓動我自己的ViewController。我真的很新穎 – tanman
我添加了這個'let storyboard:UIStoryboard = UIStoryboard( name:「Main」, bundle:nil) var menuViewController:interestViewController = storyboard.instantiateViewControllerWithIdentifier(「interestViewController」)as! interestViewController',但我得到一個SIBABRT錯誤。 – tanman