Skip to content

Commit

Permalink
Updated Readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
bibinjacobpulickal committed Mar 24, 2021
1 parent 12875d2 commit d07e5f0
Showing 1 changed file with 19 additions and 31 deletions.
50 changes: 19 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# AutoLayoutProxy
AutoLayoutProxy is a convenient way for creating and constraining views. Avoid repetation of code wherever possible.

A simple and lightweight Auto-Layout Kit that makes you feels laying out views as a fun game. AutoLayoutProxy supports UIKit on iOS & tvOS and AppKit on MacOS so you wouldn't have to worry about using different solutions on different platforms. AutoLayoutProxy is compiled on Xcode 12.0 using Swift 5.3 and will be updated for all future releases.

[![Platform](http://img.shields.io/badge/platform-ios-blue.svg?style=flat)](https://developer.apple.com/iphone/index.action)
[![Language](http://img.shields.io/badge/language-swift-brightgreen.svg?style=flat)](https://developer.apple.com/swift)
![Swift version](https://img.shields.io/badge/swift-5-orange.svg)
[![Version](https://img.shields.io/cocoapods/v/AutoLayoutProxy.svg?style=flat)](https://github.com/bibinjacobpulickal/AutoLayoutProxy)
[![License](http://img.shields.io/cocoapods/l/AutoLayoutProxy.svg?style=flat)](https://github.com/bibinjacobpulickal/AutoLayoutProxy/blob/master/LICENSE)
![Swift version](https://img.shields.io/badge/swift-5.3-orange.svg)
[![License](http://img.shields.io/badge/license-MIT-lightgray.svg?style=flat)](https://github.com/bibinjacobpulickal/AutoLayoutProxy/blob/master/LICENSE)

## Why use AutoLayoutProxy?

Expand All @@ -26,10 +26,11 @@ view.addSubview(subview) {
...
subview.trailing == view.trailing
}
// Or in short
view.addSubview(subview) {
$0.sides == $1.sides
}
// Or in short 🙂
view.addSubview(subview) { $0.sides == $1.sides }

// Or even shorter 😎
view.addSubview(subview) { $0 === $1 }
```

You see thats all thats required. Now, you might be wondering what would you do if you had to make a constraint with a relation that's not equal but, less than or greater than, like the following:
Expand Down Expand Up @@ -107,43 +108,30 @@ subview.size == 64

## Installation

### CocoaPods

[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
### Swift Package Manager

```bash
$ gem install cocoapods
```
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It is in early development, but BBLoader does support its use on supported platforms.

To integrate AutoLayoutProxy into your Xcode project using CocoaPods, specify it in your `Podfile`:
Once you have your Swift package set up, adding BBLoader as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.

```ruby
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
pod 'AutoLayoutProxy'
end
```

Then, run the following command:

```bash
$ pod install
```swift
dependencies: [
.package(url: "https://github.com/bibinjacobpulickal/AutoLayoutProxy.git", .upToNextMajor(from: "3.0.0"))
]
```
From Xcode 11.0+ you only need to provide the above mentioned URL.

## Features
- [x] Remove repetitive code while creating new view.
- [x] Fill super view or any other view with/without padding.
- [x] Align center with super view or any other view.

## Requirements
## Support

- iOS 9.0+
- Xcode 8.3+
- Swift 3.0+

## License
AutoLayoutProxy is released under the MIT license.
See LICENSE for details.
See [LICENSE](https://github.com/bibinjacobpulickal/AutoLayoutProxy/blob/master/LICENSE) for details.

0 comments on commit d07e5f0

Please sign in to comment.