Git Product home page Git Product logo

concisepurelayout's Introduction

ConcisePureLayout

Gitter

ConcisePureLayout was created to facilitate the method invocations of PureLayout library. (Objective-C only, Swift comming next).

##Installation

pod 'ConcisePureLayout'

Dependency

ConcisePureLayout is based on third party PureLayout library. So, PureLayout will be installed along with ConcisePureLayout.

##Example

Sample Code

UIView * headerView = [UIView newAutoLayoutView];
[headerView setBackgroundColor:[UIColor blackColor]];
[self.view addSubview:headerView];

UIView * footerView = [UIView newAutoLayoutView];
[footerView setBackgroundColor:[UIColor redColor]];
[self.view addSubview:footerView];

// PureLayout implementation
[headerView autoSetDimension:ALDimensionHeight toSize:200];
[headerView autoPinEdgeToSuperviewEdge:ALEdgeTop withInset:10];
[headerView autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:20];
[headerView autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:20];

[footerView autoSetDimension:ALDimensionWidth toSize:250];
[footerView autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:headerView withOffset:5];
[footerView autoAlignAxisToSuperviewAxis:ALAxisVertical];
[footerView autoPinEdgeToSuperviewEdge:ALEdgeBottom];

// ConcisePureLayout makes it more concise
[headerView aa_setHeight:200];
[headerView aa_superviewTop:10];
[headerView aa_superviewFitWidthWithInset:20];

[footerView aa_setWidth:250];
[footerView aa_pinUnderView:headerView offset:5];
[footerView aa_centerHorizontal];
[footerView aa_superviewBottom:0];

Example project
This screenshot demonstrates how you can create and place complex UI elements with ConcisePureLayout:

ConcisePureLayoutScreenshot1.png

#Contribution ConcisePureLayout still very young. Not all methods of PureLayout have been simplified with it. Simplification of the remaining methods require time and rethinking how to do it better. Let's do it together! It would be great if together we get something as simple as powerful.
Please, fork & PR!

Almas Adilbek
Regards!

concisepurelayout's People

Contributors

mixdesign avatar

Watchers

James Cloos avatar Askar Mustafin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.