lmirosevic/GBHUD — pull request #1 by pankkor (2014-08-29 14:28:36+00:00)
Title: customizable target view

I'm looking to improve spinners and now consider in using only GBHUD instead of GBLoadingIndicator. Why? Because GBLoadingIndicator silently introduces retain cycles by capturing self into started and finished blocks. We have to remove these blocks on -viewWillDissappear: and it introduces several complexities like if you switch between tabs GBLoadingIndicator can remain because finish was nullified and block didn't remove it from superview. GBHUD has a nicer design with animations, curtain views text etc.

GBLoadingIndicator has one advantage over GBHUD - it's not global. It can't be dismissed by other finished operation. It doesn't block all user interaction. So you can still browse back on navigation stack or switch tabs while operation is in progress. It impoves UX. Also it can show errorView.

So my intention is to subclass GBHUD and create a GBHUDLocal which can be shown in a particular view instead of a window and can have an error view. Currently GBHUD doesn't allow to be extended. What about of making it a bit more flexible?

F.e. the only method I need is to be to customize target view. This PR is about it.

One good improvement for GBHUD could be to reqire a pair of show/dismiss methods. We can increment number of showCount on -show and decrement on -dismiss. And perform a real dismiss at showCount == 0.
This can eliminate a problem of one operation finishing before the other and dismissing a global HUD