Skip to content

Commit 3dec0a2

Browse files
committed
Set the autoresizingMask so the HUD will auto-rotate when added to a view. Thanks to Christopher M. Böddecker.
1 parent bd7c9ff commit 3dec0a2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

MBProgressHUD.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ - (id)initWithFrame:(CGRect)frame {
182182
self.graceTime = 0.0;
183183
self.minShowTime = 0.0;
184184

185+
self.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
186+
185187
// Transparent background
186188
self.opaque = NO;
187189
self.backgroundColor = [UIColor clearColor];

0 commit comments

Comments
 (0)