A descriptive way to create NSLayoutConstraints for AutoLayout in iOS 6.0+ and access / modify them on runtime.
Objective-C Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Assets
Classes
Example
Project
.gitignore
.travis.yml
AutoLayoutKit.podspec
CHANGELOG.md
LICENSE
README.md
Rakefile

README.md

AutoLayoutKit

Version Platform Build Status Bitdeli Badge

Announcement: Manuscript

You think about using AutoLayoutKit in one of your shiny new swift-only Apps? Well, now you can.

Introducing Manuscript, the fancy successor of AutoLayoutKit written in pure Swift. (Carthage compatible, still under development)

Usage

For a very basic running example check out the example app. Clone the repo and run pod install from the Project directory first.

Let me give you a quick example on how easy it is to create NSLayoutConstraints in code using ALK.

[ALKConstraints layout:childView do:^(ALKConstraints *c) {
  [c make:ALKCenterX equalTo:self s:ALKCenterX];
  [c make:ALKCenterY equalTo:self s:ALKCenterY];
  [c set:ALKWidth to:30.f];
  [c set:ALKHeight to:30.f];
}];

Curious what the same code looks without ALK? Check out this.

New in Version 0.6.0: Convenience Methods

Entering Version 0.6.0, the basic sample from above can be improved even further.

[ALKConstraints layout:childView do:^(ALKConstraints *c) {
  [c centerIn:self];
  [c setSize:CGSizeMake(30.f, 30.f)];
}];

Requirements

Installation

AutoLayoutKit is available through CocoaPods, to install it simply add the following line to your Podfile:

pod "AutoLayoutKit"

Author

Florian Krueger, florian.krueger@projectserver.org

License

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