Search code examples
iosuiimagecalayercgpath

Place UIImage on percentage of CGPath to create it's starting point


I'm sorry i can't post any code, but StackOverflow login is blocked at my work. So i had to use my phone.

I want to create a CGPath and animate a UIImage on that path. More specifically i would like to place it on a predefined path i created but on a position of my choice. So not the starting point but a percentage of the path.

Is this possible and how can i manage this?

I know how to animate a UIImage from the start to the end but not from a percentage to another percentage of my choice.


Solution

  • I've noticed that this is impossible. I'm using separate CGPaths now. This is much easier. Just make an array with multiple 2 Point CGPaths.