Latest 3.0.0
Homepage https://github.com/kaishin/Verbena
License BSD
Platforms ios 10.0, osx 10.10, requires ARC
Authors

logo

GitHub release Carthage compatible CocoaPods Swift 4.0 platforms

A micro-framework that simplifies the task of turning drawing code or views into UIImage/NSImage instances.

Installation

Carthage

  • Add the following to your Cartfile: github "kaishin/Verbena"
  • Then run carthage update
  • Follow the current instructions in Carthage’s README
    for up to date installation instructions.

CocoaPods

  • Add the following to your Podfile: pod 'Verbena'
  • You will also need to make sure you’re opting into using frameworks: use_frameworks!
  • Then run pod install.

Usage

import Verbena

// Get a UIImage from drawing block
let image = UIImage.render(CGSize(width: 100, height: 100)) { size in
  // Drawing code goes here. Example:
  // var ovalPath = UIBezierPath(ovalInRect: CGRect(origin: CGPoint(x: 0, y: 0), size: size))
  // UIColor.blackColor().setFill()
  // ovalPath.fill()
}

// Get a UIImage from a UIView
let image = UIImage.image(from: view)

The same methods can also be used on OS X with NSImage instead.

License

Copyright 2013-2018 Reda Lemeden. BSD Licence. See LICENSE file for more info.

Latest podspec

{
    "name": "Verbena",
    "version": "3.0.0",
    "summary": "Get UIImage/NSimage instances from Core Graphics drawing code, views, etc.",
    "homepage": "https://github.com/kaishin/Verbena",
    "social_media_url": "http://twitter.com/kaishin",
    "license": {
        "type": "BSD",
        "file": "LICENSE"
    },
    "authors": {
        "Reda Lemeden": "[email protected]"
    },
    "source": {
        "git": "https://github.com/kaishin/Verbena.git",
        "tag": "v3.0.0"
    },
    "platforms": {
        "ios": "10.0",
        "osx": "10.10"
    },
    "ios": {
        "source_files": "Verbena/**/*.{h,swift}"
    },
    "osx": {
        "source_files": "VerbenaMac/**/*.{h,swift}"
    },
    "requires_arc": true,
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This