Created
March 14, 2016 16:04
-
-
Save ramakser/89106ec2653413df2dcd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.rootView = [self.window.subviews objectAtIndex:0]; | |
if (!self.rootView) { | |
self.rootView = self; | |
while (self.rootView.superview != nil) { | |
self.rootView = self.rootView.superview; | |
} | |
} | |
- (void)willMoveToWindow:(UIWindow *)newWindow { | |
if(newWindow == nil){ | |
//the view is being removed | |
[self stopAnimation]; | |
return; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment