Skip to content
0:00 / 0:00

#swiftui#canvas#draggesture

How to make a drawing app with SwiftUI 3 - part 1 - Canvas, Shapes, Path and Drag gesture

Karin Prater

24K subscribers • 1 video on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Karin Prater, iOS developer
  • Linked in the descriptiongahntpo/DrawingApp-Youtube-tutorial
  • May be out of date. The tools, versions or practices it shows have likely moved on.

Intermediate. Assumes working knowledge.

17K views5 years ago2 recommendations

Mobile developmentGraphics and audioSwiftiOS and SwiftUI

Karin Prater demonstrates how to build a custom drawing application using SwiftUI's Canvas, DragGesture, and path rendering.

In this tutorial, I am making a drawing app with SwiftUI features that are available for iOS 15 like the canvas view. I will create the model to store the line information including the line's points, line width and color. I am using a Drag gesture to get the information where to draw the lines. Last a delete, undo and redo functionality is included. Overview introduction Canvas for drawing test, shapes and images drawing and gesture DragGesture change color and line width how to draw smoother lines undo / redo Shapes instead of Canvas 40: 44 wrap up Github repository: github.com/gahntpo/DrawingApp-Youtube-tutorial If you liked what you learned and you want to see more, check out one of my courses! 👨‍💻 my SwiftUI course school.swiftyplace.com/courses/swiftui-course 👨‍💻 my Core Data and SwiftUI course school.swiftyplace.com/courses/swiftui-and-core-data 👩🏻‍💻 Combine course school.swiftyplace.com/courses/master-combine-framework #SwiftUI #MakeADrawingApp #WriteYourFirstApp

Why it's here

2 people recommend this

What people say. Recommended as a helpful tutorial for implementing custom drawing and canvas features in SwiftUI.

Moments people linked to

u/chriswacoin r/swift • Recommends

On “Vector drawing on an image with text in the middle”

Perhaps one of these will help: https://www.devtechie.com/community/public/posts/151939-drawing-app-in-swiftui-3-using-canvas link to this video

u/yalagin r/swift • Recommends

On “What library can I use to create a drawing app, PencilKit seems quite limited for drawing surprisingly”

Hi Karin, I can't believe that you actually did a whole video of building a custom drawing app and you didn't share it! [video I just happened to find it randomly! How does this canvas approach compare to your initial comment of UIKit?
1View on Reddit