它需要Xcode 8.0+和Swift 3.0。
您的项目部署目标必须为iOS 8.0+
OCExtensions可通过CocoaPods获取。要安装它,只需将以下行添加到Podfile中
。
pod 'OCExtensions'
// Get an image representation from a color.
// Default size: 1x1px
func image(withSize size: CGSize? = nil) -> UIImage?
// Example
let redImage = UIColor.redColor().image()
// Instantiate an image with a color.
// Default size: 1x1px
convenience init?(color: UIColor, size: CGSize? = nil)
// Example
let redImage = UIImage(color: UIColor.redColor())
// Returns a non-optional String value.
var textValue: String
// Check if text input is empty.
var isEmpty: Bool
// Intantiate a Gradient Layer passing only the frame, orientation and color array
convenience init(frame: CGRect, orientation: GradientOrientation, colors: [CGColor])
// TODO: documentation
// TODO: documentation
// TODO: documentation
Henrique Morbin,[email protected]
OCExtensions遵循MIT许可证。有关更多信息,请参阅LICENSE文件。