I show UIAlertController when loading my image. When the download is complete, I want to click the view controller. I have an error in the console because I am not rejecting the warning controller:
pushViewController:animated: called on <UINavigationController 0x7fb190c6ee00> while an existing transition or presentation is occurring; the navigation stack will not be updated.
In my main view controller, when the download is complete, I click another view:
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { //.... var alert = UIAlertController(title: "Alert", message: text, preferredStyle: UIAlertControllerStyle.Alert) self.presentViewController(alert, animated: true, completion: nil) dispatch_async(dispatch_get_main_queue(), { if let cellToUpdate = tableView.cellForRowAtIndexPath(indexPath) { self.performSegueWithIdentifier("postview", sender: self) } }) }
I tried wit to remove ViewControllerAnimated, but I have exactly the same error:
dispatch_async(dispatch_get_main_queue(), { if let cellToUpdate = tableView.cellForRowAtIndexPath(indexPath) { alert.dismissViewControllerAnimated(true, completion: nil) self.performSegueWithIdentifier("postview", sender: self) } })
source share