Quantcast
Channel: Controls – TAGTECINFO
Viewing all articles
Browse latest Browse all 336

[iOS App Dev Libraries, Controls, Tutorials, Examples and Tools]Framer – Open Source Library For Laying Out Views With State Support

$
0
0

Framer is an open source library submitted by Nikita for framing views with a concise Objective-C syntax.

Framer utilizes blocks, and provides a chainable syntax for laying out views and allows you to add states to quickly change the layout if needed.

This snippet shows how one could lay out two views relative to each other:

    [self.view1 installFrames:^(NUIFramer * _Nonnull framer) {
        framer.width(100).and.height(100);
        framer.super_centerX(0);
        framer.super_centerY(0);
    }];

<pre><code>[self.view2 installFrames:^(NUIFramer * _Nonnull framer) {
    framer.width(50).and.height(50);
    framer.bottom_to(self.view1.nui_top, 0);
    framer.left_to(self.view1.nui_right, 0);
}];
</code></pre>

You can find Framer on Github here.

A nice library for controlling view layouts.

Original article: Framer – Open Source Library For Laying Out Views With State Support

©2016 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Reference source: iOS App Dev Libraries, Controls, Tutorials, Examples and Tools


Viewing all articles
Browse latest Browse all 336

Trending Articles