I would like to move a UIImageview from point A to B in certain degree. the Red and Blue arrow denote the degree i want the dots to move.
i can move the dots from one point to another, but how do i move the note on a degree ?
NSLog(@"cgpoint %@",NSStringFromCGPoint(self.aggressiveDots.frame.origin));
CAKeyframeAnimation *anim = [CAKeyframeAnimation animationWithKeyPath:@"position"];
NSArray *times = [NSArray arrayWithObjects:[NSNumber numberWithFloat:0.0], nil];
[anim setKeyTimes:times];
NSArray *values = [NSArray arrayWithObjects:[NSValue valueWithCGPoint:CGPointMake(118, 188.)],
[NSValue valueWithCGPoint:CGPointMake(115, 300.)], nil];
[anim setValues:values];
[anim setDuration:6.0]; //seconds
[self.redDots.layer addAnimation:anim forKey:@"position"];