Latest 2.0.0
License MIT
Platforms ios 11.0
Frameworks UIKit

CI Status

Simple, fast, freehand drawing for UIKit.


To run the example project, clone the repo, and run pod install from the Example directory first. The example project demonstates how to use DrawingKit with a container view in a storyboard to make a simple drawing app.


DrawingKit uses UITouch events to create composite Bézier curves. After drawing the curves into the view the they are quickly saved to an image to avoid redrawing the same curves repeatedly.

Drawing happens in the view of a DrawingViewController class. In any file which imports DrawingKit the drawing view controller class will be available to use. Simply add the drawing view controller as a child view controller and a new drawing view will be available. The DrawingViewController can also be used in Storyboards.

By default DrawingKit draws black lines, 1pt thick, on a white background, with round line caps. These can all be customised by setting the appropriate properties on the DrawingViewController. For example, to draw thick white lines on a black background simply set the appropriate properties on the view controller:

drawingViewController.set(lineWidth: 20)
drawingViewController.set(backgroundColor: .black)
drawingViewController.set(lineColor: .white)

The DrawingViewController also provides access to the UIImage currently displayed, and a function to clear the current drawing. Saving and clearing the current image is as simple as

if let currentImage = drawingViewController.currentImage {
// Do something with the image

That’s it! DrawingKit makes makes freehand drawing in iOS a cinch. The rest is up to you.


DrawingKit requires iOS 11.0 or newer.


DrawingKit is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'DrawingKit'


Jamie Banford


DrawingKit is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "DrawingKit",
    "version": "2.0.0",
    "summary": "Simple, fast, freehand drawing for UIKit.",
    "description": "DrawingKit provides simple Swift API to add freehand drawing to any iOS project. It chains together touches to form smooth composite Bu00e9zier curves and quickly draws them to the screen. All curves are saved to an image shortly after drawing, and that image is available for the host application to use. Line colour, background colour, and line thickness are all easily customisable. DrawingKit is perfect for easily capturing a signature or other user input.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Jamie Banford": "[email protected]"
    "source": {
        "git": "",
        "tag": "2.0.0"
    "social_media_url": "",
    "swift_version": "4.0",
    "platforms": {
        "ios": "11.0"
    "source_files": "DrawingKit/Classes/**/*",
    "frameworks": "UIKit"

Pin It on Pinterest

Share This