Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
需要从drawRect中的多个点绘制样条线。是否可以“抛出”一组点并从中绘制连续样条曲线。另一种选择是在点之间循环并绘制多条样条线,一次从 2 个点绘制一条样条线。我想这样的连续样条被称为B样条?
您将使用UIBezierPathand its -addCurveToPoint:controlPoint1:controlPoint2:or-addQuadCurveToPoint:controlPoint:方法。您必须自己计算控制点。
UIBezierPath
-addCurveToPoint:controlPoint1:controlPoint2:
-addQuadCurveToPoint:controlPoint: