Latest 0.0.4
License MIT
Platforms ios 9.0
Frameworks UIKit

A UIView subclass that allows the user to draw on it.

Swift Version
Carthage compatible
CocoaPods Compatible
PRs Welcome

Add a DrawableView to your app and you will immediately be able to draw on it. Then try changing the stroke color, width, and transparency!


  • [x] Stroke Color
  • [x] Stroke Width
  • [x] Stroke Transparency
  • [x] Undo
  • [x] DrawableViewDelegate
  • [x] Quad Curve Interpolation


  • iOS 9.0+
  • Xcode 8.3.1



You can use CocoaPods to install DrawableView by adding it to your Podfile:

pod 'DrawableView'

Simply import DrawableView wherever you would like to use it.

import UIKit
import DrawableView


Create a Cartfile that lists the framework and run carthage update. Follow the instructions to add $(SRCROOT)/Carthage/Build/iOS/DrawableView.framework to an iOS project.

github "EthanSchatzline/DrawableView"

Usage example

class ViewController: UIViewController, DrawableViewDelegate {

    @IBOutlet var drawableView: DrawableView! {
      didSet {
        drawableView.delegate = self
        drawableView.strokeColor = .blue
        drawableView.strokeWidth = 12.0
        drawableView.transparency = 1.0

    func setDrawing(_ isDrawing: Bool) {
        Run some logic based on if the user is currently drawing a stroke or not.
        Commonly people hide the drawing tools UI while the user is drawing and fade it back in once they stop.

    func saveDrawingToPhotoLibrary() {
      guard let drawnImage = drawableView.image else { return }
      UIImageWriteToSavedPhotosAlbum(drawnImage, self, nil, nil)


We would love for you to contribute to DrawableView, check the LICENSE file for more info.


Ethan Schatzline – @_Easy_E[email protected]

Distributed under the MIT license. See LICENSE for more information.

Latest podspec

    "name": "DrawableView",
    "version": "0.0.4",
    "summary": "A UIView subclass that allows the user to draw on it.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "ethanschatzline": "[email protected]"
    "social_media_url": "",
    "platforms": {
        "ios": "9.0"
    "source": {
        "git": "",
        "tag": "0.0.4"
    "source_files": "DrawableView/*.swift",
    "frameworks": "UIKit",
    "swift_version": "4.0"

Pin It on Pinterest

Share This