Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #69 from matej/master

Ivar shadowing and a layout fix
  • Loading branch information...
commit 3d5c3cc9934b229747c902332733fe4e6fe325e4 2 parents 4ba6e7f + 1321c0b
Matej Bukovinski matej authored

Showing 1 changed file with 11 additions and 6 deletions. Show diff stats Hide diff stats

  1. +11 6 MBProgressHUD.m
17 MBProgressHUD.m
@@ -124,9 +124,9 @@ + (MBProgressHUD *)HUDForView:(UIView *)view {
124 124 MBProgressHUD *hud = nil;
125 125 NSArray *subviews = view.subviews;
126 126 Class hudClass = [MBProgressHUD class];
127   - for (UIView *view in subviews) {
128   - if ([view isKindOfClass:hudClass]) {
129   - hud = (MBProgressHUD *)view;
  127 + for (UIView *aView in subviews) {
  128 + if ([aView isKindOfClass:hudClass]) {
  129 + hud = (MBProgressHUD *)aView;
130 130 }
131 131 }
132 132 return hud;
@@ -136,9 +136,9 @@ + (NSArray *)allHUDsForView:(UIView *)view {
136 136 NSMutableArray *huds = [NSMutableArray array];
137 137 NSArray *subviews = view.subviews;
138 138 Class hudClass = [MBProgressHUD class];
139   - for (UIView *view in subviews) {
140   - if ([view isKindOfClass:hudClass]) {
141   - [huds addObject:view];
  139 + for (UIView *aView in subviews) {
  140 + if ([aView isKindOfClass:hudClass]) {
  141 + [huds addObject:aView];
142 142 }
143 143 }
144 144 return [NSArray arrayWithArray:huds];
@@ -432,6 +432,11 @@ - (void)updateIndicators {
432 432
433 433 - (void)layoutSubviews {
434 434
  435 + // Entirely cover the parent view
  436 + UIView *parent = self.superview;
  437 + if (parent) {
  438 + self.frame = parent.bounds;
  439 + }
435 440 CGRect bounds = self.bounds;
436 441
437 442 // Determine the total widt and height needed

0 comments on commit 3d5c3cc

Please sign in to comment.
Something went wrong with that request. Please try again.