Skip to content

Smooth drawing app for watchOS 3 written in Swift 3

Notifications You must be signed in to change notification settings

happywatch/Draw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Draw

Smooth drawing app for watchOS 3 written in Swift 3

This app uses the new WatchKit class, WKPanGestureRecognizer, to track finger movement and paints a random color stroke. The line is a UIBezierPath. It gets smoothed by addQuadCurve(to:controlPoint). The algotrighm accounts for the delay in the pan gesture recognizer by creating a backward projection of the stroke using the velocity of the gesture. It also creates a forward projection to stroke precisely under the user's finger. The app captures the drawing with UIGraphicsGetImageFromCurrentImageContext and uses that image for the background of a WKInterfaceGroup.

Device screenshot Movie

About

Smooth drawing app for watchOS 3 written in Swift 3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages