How to "throw" an array of points and draw continuous spline from them?

Need to draw a spline from a multiple points in drawRect. Is it possible to "throw" an array of points and draw continuous spline from them. Another option would be to loop among the points and to draw multiple splines, drawing a spline from 2 points at a time. I suppose such continuous spline is called B-spline?

Answers


You would use UIBezierPath and its -addCurveToPoint:controlPoint1:controlPoint2: or -addQuadCurveToPoint:controlPoint: method. You'll have to calculate the control points yourself.


Need Your Help

Can I get more height for UIView with xcode5?

ios7 interface-builder xcode5

I design one menu with InterfaceBuilder by xcode5, I am using UIView as menu container, but there are too many menu items, can I make the UIView height to be more large? so I can put these menu items

Cookie expiration is browser specific or server specific?

php cookies setcookie

I am setting a a cookie with an expiration time by