Latest 1.5.0
Homepage https://github.com/natmark/ProcessingKit
License MIT
Platforms osx 10.11, ios 10.0, requires ARC
Authors

Header


Build Status


Pods Version


Platforms


Swift


Carthage Compatible


codecov


ProcessingKit is a Visual designing library for iOS & OSX.
ProcessingKit written in Swift🐧 and you can write like processing.

Demo

Demo

Demo Apps

iPad Demo App (Developed for Open Source Conference)

Sketch Runner Code Comparison (between Processing and ProcessingKit)
ProcessingKit ProcessingKit

Example

OS gif code
iOS gif code
OSX gif code

Requirements

  • Swift 3.0 or later
  • iOS 10.0 or later
  • OSX 10.11 or later

If you use Swift 3.x, try ProcessingKit 0.6.0.

Usage

  1. Create custom class that inherits from ProcessingView
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.
    }
}
  1. Create a SampleView instance

    Create programmatically

    lazy var sampleView: SampleView = {
        let sampleView = SampleView(frame: frame)
        sampleView.isUserInteractionEnabled = true // If you want to use touch events (default true)
        return sampleView
    }()

Use InterfaceBuilder

  1. Add UIView to ViewController
  2. Select UIView & Open Identity inspector
  3. Set SampleView to Custom class field
  4. Add outlet connection
 @IBOutlet weak var sampleView: SampleView!

 override func viewDidLoad() {
     super.viewDidLoad()
     sampleView.isUserInteractionEnabled = true // If you want to use touch events (default true)
 }

Installation

CocoaPods

Add the following to your Podfile:

  pod "ProcessingKit"

Carthage

Add the following to your Cartfile:

  github "natmark/ProcessingKit"

Xcode File Template

  • ProcessingKit.xctemplate is available.
  • Use Donut(Xcode file template manager) to install.

$ donut install https://github.com/natmark/ProcessingKit

Documentation

License

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

Latest podspec

{
    "name": "ProcessingKit",
    "version": "1.5.0",
    "summary": "Visual Designing library for iOS.",
    "description": "ProcessingKit is a Visual Designing library for iOS.nProcessingKit written in Swiftud83dudc27  and you can write like processing.",
    "homepage": "https://github.com/natmark/ProcessingKit",
    "screenshots": "https://github.com/natmark/ProcessingKit/raw/master/Resources/ProcessingKit-Header.png?raw=true",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Atsuya Sato": "[email protected]"
    },
    "platforms": {
        "osx": "10.11",
        "ios": "10.0"
    },
    "source": {
        "git": "https://github.com/natmark/ProcessingKit.git",
        "tag": "1.5.0"
    },
    "source_files": "ProcessingKit/**/*.swift",
    "exclude_files": "ProcessingKit/Demo.playground/*",
    "ios": {
        "exclude_files": [
            "ProcessingKit/Core/Extensions/NSImage.swift",
            "ProcessingKit/Core/Extensions/NSView.swift"
        ]
    },
    "requires_arc": true,
    "subspecs": [
        {
            "name": "Core",
            "source_files": "ProcessingKit/Core/**/*.swift",
            "ios": {
                "exclude_files": [
                    "ProcessingKit/Core/Extensions/NSImage.swift",
                    "ProcessingKit/Core/Extensions/NSView.swift"
                ]
            }
        }
    ]
}

Pin It on Pinterest

Share This