Moving an object along a curved line

I would like to be able to move an object,a ball, along a curved line. I am currently using xcode 12.5. Plot point from the curve will be determined from data in a database. Sample code would be much appreciated.

Moving an object along a curved line
 
 
Q