Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(void)animate : (CGFloat )duration {
- [UIView beginAnimations:nil context:NULL];
- [UIView setAnimationDuration:duration];
- [UIView setAnimationCurve:UIViewAnimationCurveLinear];
- [UIView setAnimationBeginsFromCurrentState:YES];
- //[UIView setAnimationDelegate:self];
- [UIView setAnimationRepeatCount:2];
- [UIView setAnimationDidStopSelector:@selector(myCallback:finished:context:) ];
- CGRect frames =fishFall .frame;
- frames.origin = CGPointMake(100, 600);
- fishFall.frame = frames;
- // NSLog(@"My view frame: %@", NSStringFromCGRect(frames));
- [UIView commitAnimations];
- }
- -(void)animateFromStart
- {
- [self.animate:1.5];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement