Skip to content

natmark/NALiveSketchView

Repository files navigation

NALiveSketchView

Carthage compatible

About

Live camera view with drawable view.

Screenshot

Usage

  lazy var sketchView:NALiveSketchView = {
        return NALiveSketchView(frame: frame)
    }()

Usage with Storyboard

Connect the UIView to NALiveSketchView Class

 @IBOutlet weak var liveSketchView: NALiveSketchView!

Take Sketch Photo

You can get image that combined photo and sketch.

  func takeSketchPhoto(completionHandler: @escaping (_ image: UIImage) -> ())

Options

You can set drawableView options.

  • liveSketchView.drawableView.penColor = UIColor.black

To change drawing color, just set penColor parameter.

  • liveSketchView.drawableView.penMode = .pen

To switch penMode, just set penMode parameter.

public enum NAPenMode {
    case pen
    case eraser
}

Instration

Add this to Cartfile

github "natmark/NALiveSketchView" ~> 0.1

Author

natmark

License

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