Skip to content

Latest commit

 

History

History
89 lines (67 loc) · 2.08 KB

README.md

File metadata and controls

89 lines (67 loc) · 2.08 KB

OCExtensions

Swift 3.0 compatible Build Status Version License Platform

Requirements

It requires Xcode 8.0+ and Swift 3.0.

Your project deployment target must be iOS 8.0+

Installation

OCExtensions is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'OCExtensions'

Documentation

Color

// Get an image representation from a color.
// Default size: 1x1px
func image(withSize size: CGSize? = nil) -> UIImage?

// Example
let redImage = UIColor.redColor().image()

Image

// Instantiate an image with a color.
// Default size: 1x1px
convenience init?(color: UIColor, size: CGSize? = nil)

// Example
let redImage = UIImage(color: UIColor.redColor())

TextField

// Returns a non-optional String value.
var textValue: String

// Check if text input is empty.
var isEmpty: Bool

Layer

// Intantiate a Gradient Layer passing only the frame, orientation and color array
convenience init(frame: CGRect, orientation: GradientOrientation, colors: [CGColor])

View

// TODO: documentation

Badge

// TODO: documentation

ViewController

// TODO: documentation

Author

Henrique Morbin, morbin_@hotmail.com

License

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