Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(void) reset
- {
- self.frame = CGRectMake(originalFrame.origin.x, originalFrame.origin.y, self.frame.size.width, self.frame.size.height);
- // [self animate];
- [self performSelector:@selector(animate) withObject: nil afterDelay: 0.0f];
- }
- -(void) animate
- {
- [UIView beginAnimations:nil context:NULL];
- [UIView setAnimationDuration:5.0f];
- [UIView setAnimationCurve:UIViewAnimationCurveLinear];
- [UIView setAnimationBeginsFromCurrentState:YES];
- CGRect aframe = self.frame;
- aframe.origin.x += (320.0f - aframe.size.width);
- self.frame = aframe;
- [UIView commitAnimations];
- }
Add Comment
Please, Sign In to add comment