jdg/MBProgressHUD — Issue #35: possible issue about indicator
Author: bluekurk
Created: 2011-12-30 18:06:10+00:00
State: open

I am using a modified edition of MBProgressHUD (a little old), so I just want to ask if the following questions is nonsense:

1. I am using the MBProgressHUDModeInDeterminate mode so the indicator is always
self.indicator = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge] autorelease];
since it is autoreleased, and most of time it will be set to in in selector "cleanup", it is still a little confusing that
[indicator release] is in selector dealloc .

2. I found an abuse of using MBProgressHUD in our code: it alloc a new HUD at the end of another HUD's protocol hudWasHidden: . and it causes crashes on my iPad2(4.3.3), but works fine on iPhone4(4.3) and iPhone 3G(4.2.1)
the reason is that it execute "cleanUp" first, set indicator to nil, then calls layoutSubviews. then the indicator.bounds is unavailable and causes crash. i just add
if(!self.indicator) return;
to line 309. Is it OK?

Thanks for reviewing.