Drawing a bezier curve between a set of given points

后端 未结 6 1653
春和景丽
春和景丽 2021-02-13 13:40

What is the best way to draw a bezier curve, in iOS application, that passes through a set of given points

6条回答
  •  难免孤独
    2021-02-13 14:35

    You can easily google some example of how to create bezier curve on the web. I found this short tut as an example.

    You can create a close bezier curve for e.g. with the following code snippet:

    UIBezierPath* path = [UIBezierPath bezierPath];
    
    [path moveToPoint:pt1];
    [path addLineToPoint:pt2];
    [path addLineToPoint:pt3];
    
    [path closePath];
    

    I hope it will help as a starting point.

提交回复
热议问题