Visualizzo un controller UIAlert durante il download dell'immagine. Quando il download è finito, voglio spingere un controller di visualizzazione. Ho un errore nella console, perché non respingere il controller avviso:Come ignorare un UIAlertController senza azioni in SWIFT?
pushViewController:animated: called on <UINavigationController 0x7fb190c6ee00> while an existing transition or presentation is occurring; the navigation stack will not be updated.
A mio controller della vista principale, quando il download è terminato, spingo altro punto di vista:
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 ingegno provato dismissViewControllerAnimated ma ho esattamente lo stesso errore:
dispatch_async(dispatch_get_main_queue(), {
if let cellToUpdate = tableView.cellForRowAtIndexPath(indexPath) {
alert.dismissViewControllerAnimated(true, completion: nil)
self.performSegueWithIdentifier("postview", sender: self)
}
})
Funziona! Grazie ! – cmii
Anche io sto avendo lo stesso problema, @ dasblinkenlight.Puoi aiutarmi? Ecco il mio link: http://stackoverflow.com/questions/30840235/console-warning-in-my-custom-alert-controller-which- detto-che-era-tentativo-to-Prese –