jdg / MBProgressHUD

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

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'MBProgressHUD needs to be accessed on the main thread. #505

Closed Nayab14 closed 7 years ago

Nayab14 commented 7 years ago

hi i am facing the issue on MBProgressHud.m in the following method

in this line afte assertion failure: NSEnumerator *subviewsEnum = [view.subviews reverseObjectEnumerator];

matej commented 7 years ago

MBProgressHUD needs to be accessed on the main thread.

This means that you are using HUD methods that are meant to be accessed on the main thread on a different thread. That's likely an issue in your code. Check your threading code.

https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Multithreading/Introduction/Introduction.html