//Event created alert
let alert = UIAlertController(title: "Event Created", message: "Event successfully created", preferredStyle: UIAlertControllerStyle.Alert);
alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler:nil));
self.presentViewController(alert, animated: true, completion: nil);
//Pop back to table
self.navigationController!.popToRootViewControllerAnimated(true);
このコードでは、アラートを作成し、アラートの直後にpopToRootViewControllerAnimatedメソッドを使用します。これは何らかの理由で動作しませんし、私が見つけた回避策はpresentViewControllerの完了の中でメソッドを呼び出すことです。alertのpresentviewcontrollerの後にpopviewcontrollerが動作しないのはなぜですか?
popureメソッドがclosureに入れられていない限り、presentViewControllerメソッドの後で動作しないのはなぜですか?