当我将函数转换添加到名为“Result”的其他视图时,对于UIAlertController的对象,它转换为黑色视图,我无法在其中执行任何操作。帮我解决一下。
var controller : UIAlertController?
@IBAction func next() {
controller = UIAlertController(title: "Warning:", message: "Are you sure ?", preferredStyle: .Alert)
let action = UIAlertAction(title: "Sure!", style: UIAlertActionStyle.Default, handler:{(paramAction: UIAlertAction!) in self.transition()})
controller?.addAction(action)
self.presentViewController(controller!, animated: true, completion: nil)
}
func transition() {
let secondViewController:Result = Result()
self.presentViewController(secondViewController, animated: true, completion: nil)
}