ChainableKit is a convience way to set up UIKit component with chainable syntax. This framework is inspired by Masonry and JHChainableAnimations.
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.
pod "ChainableKit", "~> 0.1.0"
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;
ChainableKit is available under the MIT license. See the LICENSE file for more info.
- Documentation