Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example
TJExtensions.xcodeproj
TJExtensions
.gitignore
.swift-version
.travis.yml
LICENSE
README.md
TJExtensions.podspec
_Pods.xcodeproj

README.md

TJExtensions

Useful extensions for UIKit framework.

  • UIColor Extensions
  • UIView Extensions
  • UILabel Extensions

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.

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.

You can’t perform that action at this time.