Wyświetlam kontroler UIAlertController podczas pobierania obrazu. Po zakończeniu pobierania chcę nacisnąć kontroler widoku. Mam błąd w konsoli, bo nie odwołuje powiadomienie Kontroler:Jak zamknąć kontroler UIAlertController bez żadnych działań w SWIFT?
pushViewController:animated: called on <UINavigationController 0x7fb190c6ee00> while an existing transition or presentation is occurring; the navigation stack will not be updated.
w moim głównym kontrolerem widok, gdy pobieranie zostanie zakończone, wciskam inny pogląd:
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 próbowałem wit dismissViewControllerAnimated ale mam dokładnie ten sam błąd:
dispatch_async(dispatch_get_main_queue(), {
if let cellToUpdate = tableView.cellForRowAtIndexPath(indexPath) {
alert.dismissViewControllerAnimated(true, completion: nil)
self.performSegueWithIdentifier("postview", sender: self)
}
})
Działa! dzięki ! – cmii
Mam ten sam problem, @ dasblinkenlight.Can możesz mi pomóc? Oto mój link: http://stackoverflow.com/questions/30840235/console-warning-in-my-custom-alert-controller- który- powiedział-to-był-próbować-by-prese –