Easy to use draw tool written in Swift.
Currently supports iPad screen sizes.
Simply initialize or extend CanvasViewController.
For more costumization use DrawView with PaletteView.
lazy var paletteViewModel: PaletteViewModel = {
return PaletteViewModel(color: .black, width: 5, tool: .pencil, backgroundColor: self.view.backgroundColor ?? .white)
}()
lazy var canvasView: DrawView = {
let view = DrawView(scale: UIApplication.shared.keyWindow?.screen.scale ?? 2, paletteViewModel: paletteViewModel)
view.backgroundColor = .white
return view
}()
lazy var paletteView: PaletteView = {
let view = PaletteView.viewFromNib
view.eventHandler = self
view.present(viewModel: self.paletteViewModel)
return view
}()
Implementation was inspiered by TouchCanvas