dillidon/alerts-and-pickers

Warning: Attempt to present UIAlertController

alabdulaal opened this issue · 1 comments

I have a collection view, in the footer of the collectionView I have a tableView. I'm using a protocol to have a custom cell present the pickerView. I'm getting this error whenever I press the button

PickerViewViewController.swift (line: 43) :: deinit :: has deinitialized 2018-08-01 17:45:08.675531-0700 localSelling[23104:2173373] Warning: Attempt to present <UIAlertController: 0x7ff28b850800> on <UINavigationController: 0x7ff28c00b000> whose view is not in the window hierarchy!

Dohab commented

instead of using:
alert.show()
use:
self.present(alert, animated: true)