ChainableKit

Chainable UIKit in Objective-C

MIT License

Stars
27
Committers
1

ChainableKit

ChainableKit is a convience way to set up UIKit component with chainable syntax. This framework is inspired by Masonry and JHChainableAnimations.

Installation with CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like DKNightVersion in your projects. See the Get Started section for more details.

Podfile

pod "ChainableKit", "~> 0.1.0"

How to use

Use these code to configure view's backgroundColor.

view.make.backgroundColor([UIColor whiteColor]);

Use these code to initialize a label from a class method and setup it with chainable syntax.

UIColor *red = [UIColor redColor];
UILabel.make
    .backgroundColor(red)
    .textAlignment(NSTextAlignmentCenter)

You can get the UIKit components back with view method.

UILabel *label = UILabel.make
					.backgroundColor(red)
					.textAlignment(NSTextAlignmentCenter)
					.view;

Contact

License

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

Todo

  • Documentation