Skip to content

OpenCraft/OCExtensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.