CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

TJExtensions 0.2.11

TJExtensions 0.2.11

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release May 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Yutaka Tajika.



  • By
  • Yutaka Tajika

TJExtensions

Useful extensions for UIKit framework.

  • UIColor Extensions
  • UIView Extensions
  • UILabel Extensions

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

UIColor Extensions

Initializers

  • convenience init(hex: Int, alpha: CGFloat)
  • convenience init(intRed: Int, green: Int, blue: Int, alpha: CGFloat)

Examples

let redColor = UIColor.init(hex: 0xFF0000, alpha: 1.0)
let greenColor = UIColor(intRed: 0, green: 255, blue: 0, alpha: 1.0)

UIView Extensins

Methods

  • func border(borderWidth borderWidth: CGFloat, borderColor: UIColor?, borderRadius: CGFloat?)
  • func border(positions: [BorderPosition], borderWidth: CGFloat, borderColor: UIColor?)

Inspectable Variables

  • var borderWidth: CGFloat
  • var borderColor: UIColor?
  • var cornerRadius: CGFloat

TJViewExtensions1

Examples

let borderedView = UIView(frame: CGRectMake(0.0, 0.0, 200, 50))
borderedView.border([.Top, .Right], borderWidth: 3.5, borderColor: borderColor)

UILabel Extensions

Inspectable Variables

  • var underline: Bool

TJLabelExtensions1

Author

Yutaka Tajika

License

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