Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/toni77777/pinanchor

PinAnchor is a library to make views layout easy on iOS and macOS. The library is based on Anchors
https://github.com/toni77777/pinanchor

anchor autolayout ios macos nsview swift uiview

Last synced: 26 days ago
JSON representation

PinAnchor is a library to make views layout easy on iOS and macOS. The library is based on Anchors

Awesome Lists containing this project

README

        

# PinAnchor

# Usage

## Quick Start

```swift

import PinAnchor

let greenView = UIView()
greenView.backgroundColor = .green
view.addSubview(greenView)
greenView.translatesAutoresizingMaskIntoConstraints = false

greenView
.pinToTop(inset: 50)
.pinToLeft(inset: 30)
.pinToRight(inset: 30)
.pinToBottom(inset: 50)
```

# Installation

## CocoaPods

```
pod 'PinAnchor', '~> 1.0'
```

PinAnchor is released under the MIT license.