To run the example project, clone the repo, and run pod install
from the Example directory first.
- iOS 9.0+
- Swift 5.0+
MobilliumBuilders is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'MobilliumBuilders'
MobilliumBuilders comes with these builders.
- AttributedStringDictionaryBuilder
- MutableParagraphStyleBuilder
- UIButtonBuilder
- UIImageViewBuilder
- UILabelBuilder
- UIScrollViewBuilder
- UIStackViewBuilder
- UITextFieldBuilder
- UIViewBuilder
- UITableViewBuilder
- UICollectionViewBuilder
- UITextViewBuilder
- UIPageControlBuilder
- UIProgressViewBuilder
- UISwitchBuilder
- UISliderBuilder
- UIStepperBuilder
- UIBarButtonItemBuilder
Example usage:
import MobilliumBuilders
let button = UIButtonBuilder()
.title("button")
.backgroundColor(UIColor.red)
.titleColor(UIColor.white)
.titleFont(.systemFont(ofSize: 12))
.cornerRadius(8)
.build()
let stackView = UIStackViewBuilder()
.axis(.vertical)
.spacing(10)
.alignment(.center)
.distribution(.fillEqually)
.build()
let view = UIViewBuilder()
.backgroundColor(UIColor.red)
.build()
MobilliumBuilders is available under the MIT license. See the LICENSE file for more info.