From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 23,000 courses taught by industry experts.

CoreGraphics curves

CoreGraphics curves

- [Instructor] Over the last few weeks, we've been looking to some features of Core Graphics. This time, I want to look at the two curves you can add to paths. Now, in the exercise file, I made a playground which draws a background with two axes, so go ahead and run that. And you can see the axes here. I've also made these points here as constants so we can use them later in the code. So I'm going to scrunch this over so we can see this better and I'm going to move up here now to where we've got some curves here. Now, there's two kinds of curves. There's a one-point control curve and a two-point control curve. The one point is called the quad curve and you're going to add it just like you would add a line and so what I'll do is add a context. And then addQuadCurve. And the QuadCurve will be this one control point. You can see here, we've got a parameter control here. The to goes from the move we have up here…

Contents