Latest 0.2.9
Homepage https://github.com/taji-taji/TJExtensions
License MIT
Platforms ios 9.0, requires ARC
Authors

Useful extensions for UIKit framework.

  • TJColorExtensions
  • TJViewExtensions
  • TJLabelExtensions

Version
Carthage compatible
License
Platform
Swift version

Installation

CocoaPods

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

pod "TJExtensions"

Carthage

github "taji-taji/TJExtensions"

Usage

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

TJColorExtensions

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)

TJViewExtensins

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)

TJLabelExtensions

Inspectable Variables

  • var underline: Bool

TJLabelExtensions1

Author

Yutaka Tajika

License

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

Latest podspec

{
    "name": "TJExtensions",
    "version": "0.2.9",
    "summary": "Useful extensions for UIKit framework.",
    "description": "Useful extensions for UIKit framework.n'UIView', 'UILabel' and 'UIColor' are extended.",
    "homepage": "https://github.com/taji-taji/TJExtensions",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Yutaka Tajika": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/taji-taji/TJExtensions.git",
        "tag": "0.2.9"
    },
    "source_files": "TJExtensions/**/*.swift",
    "exclude_files": "Classes/Exclude",
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This