Latest 0.3
Homepage https://github.com/kean/Nuke-Toucan-Plugin
License MIT
Platforms ios 9.0, tvos 9.0
Dependencies Nuke, Toucan

Nuke Toucan Plugin


Toucan plugin for Nuke that provides a simple API for processing images. It supports resizing, cropping, rounded rect masking and more.

Usage

The plugin adds two methods in an extension of Nuke.Request which let you easily use first-class Toucan API to process your image:

var request = Nuke.Request(url: url)
request.process(key: "Avatar") {
    return $0.resize(CGSize(width: 500, height: 500), fitMode: .crop)
             .maskWithEllipse()
}

And a non-mutating method:

let request = Nuke.Request(url: url).processed(key: "Avatar") { 
    return $0.resize(CGSize(width: 500, height: 500), fitMode: .crop)
             .maskWithEllipse()
}

A key which you provide in the request is used to compare image processors. Equivalent image processors should have the same key. Sometimes a simple string like "Avatar" will do.

Naturally you can add your own extensions to Nuke.Request to describe common operations.

Installation

CocoaPods

To install the plugin add a dependency to your Podfile:

# source 'https://github.com/CocoaPods/Specs.git'
# use_frameworks!

pod 'Nuke-Toucan-Plugin'
pod 'Toucan'

Carthage

To install the plugin add a dependency to your Cartfile:

github "kean/Nuke-Toucan-Plugin"

Requirements

  • iOS 9 / tvOS 9
  • Xcode 8
  • Swift 3

Dependencies

License

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

Latest podspec

{
    "name": "Nuke-Toucan-Plugin",
    "version": "0.3",
    "summary": "Toucan plugin for Nuke - image loading and caching framework",
    "homepage": "https://github.com/kean/Nuke-Toucan-Plugin",
    "license": "MIT",
    "authors": "Alexander Grebenyuk",
    "source": {
        "git": "https://github.com/kean/Nuke-Toucan-Plugin.git",
        "tag": "0.3"
    },
    "social_media_url": "https://twitter.com/a_grebenyuk",
    "platforms": {
        "ios": "9.0",
        "tvos": "9.0"
    },
    "module_name": "NukeToucanPlugin",
    "dependencies": {
        "Nuke": [
            "~> 5.0"
        ],
        "Toucan": [
            ">= 0.6"
        ]
    },
    "source_files": "Sources/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This