jdg / MBProgressHUD

MBProgressHUD + Customizations
http://www.bukovinski.com/
MIT License
16.01k stars 3.56k forks source link

App crashes after version 1.0 update #396

Closed SlavcoPetkovski closed 8 years ago

SlavcoPetkovski commented 8 years ago

In older version I was showing MBProgressHUD like this: let loadingNotification = MBProgressHUD.showHUDAddedTo(self.view, animated: true) loadingNotification.mode = MBProgressHUDMode.Indeterminate loadingNotification.label.text = "Loading"

After upgrading to version 1.0 I got crash like: [MBProgressHUD hideAnimated:]: unrecognized selector sent to instance and same for loadingNotification.label

matej commented 8 years ago

How can I reproduce it? Is this reproducible in the demo app?

SlavcoPetkovski commented 8 years ago

Just add let loadingNotification = MBProgressHUD.showHUDAddedTo(self.view, animated: true) loadingNotification.mode = MBProgressHUDMode.Indeterminate loadingNotification.labelText = "Loading", but I'm not placing this code on main thread, maybe thats the issue. Should I place it in GCD's main queue?

SlavcoPetkovski commented 8 years ago

It crashes no more. Close the issue. I've just put the hiding process in main queue.

matej commented 8 years ago

You probably hit one of the new main thread assertions then. That needs to be called on the main thread. This was always a requirement - it's just being explicitly enforced now.