Created
August 10, 2011 06:26
-
-
Save pratikshabhisikar/1136244 to your computer and use it in GitHub Desktop.
Dismissing UIView manually
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
- (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context { | |
[self.view removeFromSuperview]; | |
} | |
-(void) dismiss { | |
[UIView beginAnimations:nil context:nil]; | |
[UIView setAnimationDuration:0.3f]; | |
[UIView setAnimationDelegate:self]; | |
[UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)]; | |
CGRect rect = self.view.frame; | |
rect.origin.y =+ rect.size.height; | |
self.view.frame = rect; | |
[UIView commitAnimations]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment