Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Return a HUD as soon as one is found in HUDForView:

  • Loading branch information...
commit 271252c1921eba489d77387c41ed5eba421ae71b 1 parent 0151c89
Don Wilson dontangg authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 MBProgressHUD.m
5 MBProgressHUD.m
View
@@ -125,15 +125,14 @@ + (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated {
}
+ (MBProgressHUD *)HUDForView:(UIView *)view {
- MBProgressHUD *hud = nil;
NSArray *subviews = view.subviews;
Class hudClass = [MBProgressHUD class];
for (UIView *aView in subviews) {
if ([aView isKindOfClass:hudClass]) {
- hud = (MBProgressHUD *)aView;
+ return (MBProgressHUD *)aView;
}
}
- return hud;
+ return nil;
}
+ (NSArray *)allHUDsForView:(UIView *)view {
Please sign in to comment.
Something went wrong with that request. Please try again.