hi again there !
i just want to ask how can i move a UIView with a translation.
i want that my view do a translation from the point (0,0) to (0,100) and to (0,100) back to (0,0). i can move the UIView from (0,0) to (0,100) but when i configure the reverse translation that does'nt work ...
any solution to perform this?
i just want to ask how can i move a UIView with a translation.
i want that my view do a translation from the point (0,0) to (0,100) and to (0,100) back to (0,0). i can move the UIView from (0,0) to (0,100) but when i configure the reverse translation that does'nt work ...
Code:
CABasicAnimation *theAnimation;
theAnimation=[CABasicAnimation animationWithKeyPath:@"position"];
theAnimation.duration=1;
theAnimation.repeatCount=1;
theAnimation.autoreverses=NO;
[effet.layer addAnimation:theAnimation forKey:@"animateposition"];
effet.layer.frame = CGRectMake(0,100,20,20);
theAnimation=[CABasicAnimation animationWithKeyPath:@"position"];
theAnimation.duration=1;
theAnimation.repeatCount=1;
theAnimation.autoreverses=NO;
[effet.layer addAnimation:theAnimation forKey:@"animateposition"];
effet.layer.frame = CGRectMake(0,0,20,20);
any solution to perform this?