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

https://github.com/gtokman/viewtilities

A collection of UIView utilities.
https://github.com/gtokman/viewtilities

cocoapods swift uiview uiviewcontroller

Last synced: 10 months ago
JSON representation

A collection of UIView utilities.

Awesome Lists containing this project

README

          

# Viewtilities

**Viewtilities** is a collection of `UIView` utilities. It provides useful extensions that will speed up your workflow
when building your UI.

[![Version](https://img.shields.io/cocoapods/v/Viewtilities.svg?style=flat)](https://cocoapods.org/pods/Viewtilities)
[![License](https://img.shields.io/cocoapods/l/Viewtilities.svg?style=flat)](https://cocoapods.org/pods/Viewtilities)
[![Platform](https://img.shields.io/cocoapods/p/Viewtilities.svg?style=flat)](https://cocoapods.org/pods/Viewtilities)

## Contents
- [Installation](#installation)
- [UIView](#view-examples)
- [Round Corners](#round-corners)
- [Shadow](#shadow)
- [Border](#border)
- [Chaining](#chaining)
- [Custom Views](#custom-view-examples)
- [BaseView](#baseview)
- [ModifiableView](#modifiableview)
- [UIViewControllers](#view-controller-examples)

## View Examples

#### Round Corners

```swift
myView.add(
.cornerRadius(.custom(corners: [.all], radius: 10))
)
```


round

#### Shadow

```swift
myView.add(
.shadow(.custom(offset: .init(width: 0, height: 2), radius: 5, opacity: 0.25, color: .black))
)
```


shadow

#### Border

```swift
myView.add(
.border(.custom(color: .black, width: 1))
)
```


border

#### Chaining

```swift
myView.add(
.cornerRadius(.custom(corners: [.all], radius: 10)),
.shadow(.custom(offset: .init(width: 0, height: 2), radius: 5, opacity: 0.25, color: .black)),
.border(.default)
)
```


all

## View Controller Examples

#### Coming soon

## Custom View Examples

#### BaseView - Coming Soon

#### ModifiableView - Coming Soon

## Installation

Viewtilities is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'Viewtilities'
```
Then run pod install.

Don't forget to import `Viewtilities` in every file you'd like to use `Viewtilities`.

## Author

[![Twitter Follow](https://img.shields.io/twitter/follow/bestgaryever.svg?style=social)](https://twitter.com/bestgaryever)

[![Twitter Follow](https://img.shields.io/github/followers/gtokman.svg?style=social&label=Follow)](https://github.com/gtokman)

## License

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