```
//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);

```

Here in this code, I create an alert, and directly after the alert I use the popToRootViewControllerAnimated method. This doesn't work for some reason and the workaround i found is to call the method inside the completion of presentViewController. 

Why is it that the pop method doesn't work after the presentViewController method unless it's put into the closure?