diff --git a/README.md b/README.md index 8498a96..7572250 100644 --- a/README.md +++ b/README.md @@ -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? @@ -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: @@ -107,38 +108,25 @@ 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 '' 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+ @@ -146,4 +134,4 @@ $ pod install ## License AutoLayoutProxy is released under the MIT license. -See LICENSE for details. +See [LICENSE](https://github.com/bibinjacobpulickal/AutoLayoutProxy/blob/master/LICENSE) for details.