Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/taji-taji/tjextension


https://github.com/taji-taji/tjextension

Last synced: 5 days ago
JSON representation

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)