KitUI written in Swift
If you want to write your view in the code, UIKit is so hard and complex. SwiftUi is cool but you can't use it for old projects. KitUI is so easy to use. you can create your View in one second :). KitUI is so suitable for old projects. KitUI is so easier than SnapKit :)
for example:
- Support AutoLayout and Constraints
- UIView
- UIButton
- UIImageView
- UILabel
- UIStackView
- ListView
- GridView
open your terminal and enter pod install
pod 'KitUI'
import KitUI
class MyViewController: UIViewController {
private var vwMain = UIView()
override func viewDidLoad() {
super.viewDidLoad()
vwMain
.add(base: self.view)
.setBackground(color: .purple)
.setCorner(radius: 16)
.width(constant: 200)
.height(constant: 80)
.center(to: self.view)
}
}
you can set attribute for your view and set constraints and add it into your SuperView :) that's it.