File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -192,12 +192,7 @@ - (id)initWithFrame:(CGRect)frame {
192192
193193- (id )initWithView : (UIView *)view {
194194 NSAssert (view, @" View must not be nil." );
195- id me = [self initWithFrame: view.bounds];
196- // We need to take care of rotation ourselfs if we're adding the HUD to a window
197- if ([view isKindOfClass: [UIWindow class ]]) {
198- [self setTransformForCurrentOrientation: NO ];
199- }
200- return me;
195+ return [self initWithFrame: view.bounds];
201196}
202197
203198- (id )initWithWindow : (UIWindow *)window {
@@ -279,6 +274,15 @@ - (void)handleMinShowTimer:(NSTimer *)theTimer {
279274 [self hideUsingAnimation: useAnimation];
280275}
281276
277+ #pragma mark - View Hierrarchy
278+
279+ - (void )didMoveToSuperview {
280+ // We need to take care of rotation ourselfs if we're adding the HUD to a window
281+ if ([self .superview isKindOfClass: [UIWindow class ]]) {
282+ [self setTransformForCurrentOrientation: NO ];
283+ }
284+ }
285+
282286#pragma mark - Internal show & hide operations
283287
284288- (void )showUsingAnimation : (BOOL )animated {
You can’t perform that action at this time.
0 commit comments