Advertisement
Guest User

Untitled

a guest
Aug 1st, 2014
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. -(void)animate : (CGFloat )duration {
  2. [UIView beginAnimations:nil context:NULL];
  3. [UIView setAnimationDuration:duration];
  4. [UIView setAnimationCurve:UIViewAnimationCurveLinear];
  5. [UIView setAnimationBeginsFromCurrentState:YES];
  6. //[UIView setAnimationDelegate:self];
  7. [UIView setAnimationRepeatCount:2];
  8. [UIView setAnimationDidStopSelector:@selector(myCallback:finished:context:) ];
  9. CGRect frames =fishFall .frame;
  10. frames.origin = CGPointMake(100, 600);
  11. fishFall.frame = frames;
  12. // NSLog(@"My view frame: %@", NSStringFromCGRect(frames));
  13. [UIView commitAnimations];
  14. }
  15.  
  16. -(void)animateFromStart
  17. {
  18. [self.animate:1.5];
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement