You can integrate C4 right into any UIViewController.
The only "real" convenience of the CanvasController
is the setup method which is essentially just:
open override func viewDidLoad() {
canvas.backgroundColor = C4Grey
ShapeLayer.disableActions = true
self.setup()
ShapeLayer.disableActions = false
}
And
open override var prefersStatusBarHidden: Bool {
return true
}
Also... the use of the word canvas
is a convenience. You can alway do: vc.view.add(obj)
AAAAAAND there are extensions to UIView
that lets you do add(obj)
so you can keep consistent with:
view.add(uiview)
view.add(shape)
... instead of having to do:
view.addSubview(shape.view)