KSLayout 1.0.3

KSLayout 1.0.3

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Nov 2015

Maintained by Kai Straßmann.



KSLayout 1.0.3

  • By
  • Kai Straßmann

KSLayout is a tiny library that helps to automatically layout subviews in a container view by creating the necessary constraints.

Installation

Use CocoaPods to add KSLayout to your project. Just add the following line to your Podfile.

pod 'KSLayout', '~> 1.0.3'

Example

[self.container setSubviewsStacked:@[view1, view2, view3, view4, view5] layoutDirection:KSLayoutDirectionVertical settings:^(KSLayoutSettings *settings) {
    settings.subviewSpacing = 10;
    settings.subviewSize = 45;
    settings.containerPadding = UIEdgeInsetsMake(10, 10, 10, 10);
}];