MBProgressHUD drawing dimmed background when hidden
I noticed that the progress hud is rendering the background even when it's hidden.
I guess this is slowing performances for absolute no reason. What do you think is the smartest way to avoid this?
I'm not sure what exactly you mean here. Could you be more specific?
Yes. Consider this example: you create a view, you get a hud for that view using showHUDAddedTo.
Next you get the same pointer to the hud using the HUDForView method, and then you issue a [hud hide];
At this point, if you rotate the screen of your device, the drawRect method in the MBProgressHUD is called and, if the dimBackground property is set to true, even the background is redrawn. This leads to slowdowns, especially when on retina displays on iPads.
The problem is solved by setting the removeFromSuperViewOnHide to YES. It defaults to NO, which I find it to be somehow nonsense.
Still, glad to have a fix for this :)
I have a huge lag because of never ending calls to drawRect: for dimmingView while scrolling my UICollectionView. removeFromSuperViewOnHide must be YES by default.