Verbena 3.0.0

Verbena 3.0.0

LangLanguage SwiftSwift
License BSD
ReleasedLast Release Jan 2018
SwiftSwift Version 4.0
SPMSupports SPM

Maintained by Reda Lemeden.

Verbena 3.0.0

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



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.imageFromView(view)

The same methods can also be used on OS X.


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