dillidon / alerts-and-pickers

Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date...
MIT License
5.66k stars 701 forks source link

Warning: Attempt to present UIAlertController #52

Open alabdulaal opened 6 years ago

alabdulaal commented 6 years ago

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 6 years ago

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