Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taji-taji/tjextension
https://github.com/taji-taji/tjextension
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/taji-taji/tjextension
- Owner: taji-taji
- Created: 2015-12-07T23:39:49.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-19T07:28:22.000Z (almost 9 years ago)
- Last Synced: 2023-04-04T02:41:49.242Z (over 1 year ago)
- Language: Swift
- Size: 27.3 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TJExtension
Useful extensions for UIKit framework.
- TJColorExtensions
- TJViewExtensions
- TJLabelExtensions## TJColorExtensions
### Initializers
- `convenience init(hex: Int, alpha: CGFloat)`
- `convenience init(intRed: Int, green: Int, blue: Int, alpha: CGFloat)`### Usage
```swift
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](https://raw.githubusercontent.com/wiki/taji-taji/TJExtension/images/TJViewExtensions1.png)
### Usage
```swift
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](https://raw.githubusercontent.com/wiki/taji-taji/TJExtension/images/TJLableExtensions1.png)