ProcessingKit is a Visual designing library for iOS & OSX. ProcessingKit written in Swiftš§ and you can write like processing.
Sketch Runner | Code Comparison (between Processing and ProcessingKit) |
---|---|
OS | gif | code |
---|---|---|
iOS | ||
OSX |
If you use Swift 3.x, try ProcessingKit 0.6.0.
import ProcessingKit
class SampleView: ProcessingView {
func setup() {
// The setup() function is run once, when the view instantiated.
}
func draw() {
// Called directly after setup(), the draw() function continuously executes the lines of code contained inside its block until the program is stopped or noLoop() is called.
}
}
lazy var sampleView: SampleView = {
let sampleView = SampleView(frame: frame)
sampleView.isUserInteractionEnabled = true // If you want to use touch events (default true)
return sampleView
}()
@IBOutlet weak var sampleView: SampleView!
override func viewDidLoad() {
super.viewDidLoad()
sampleView.isUserInteractionEnabled = true // If you want to use touch events (default true)
}
Add the following to your Podfile
:
pod "ProcessingKit"
Add the following to your Cartfile
:
github "natmark/ProcessingKit"
ProcessingKit.xctemplate
is available.$ donut install https://github.com/natmark/ProcessingKit
ProcessingKit is available under the MIT license. See the LICENSE file for more info.