Pack of UIView extensions to simplify creation of UIView and other primary UI classes


UIBuilder 1.0 privides SwiftUI style creation of the view, configuring it and returning the created view

let view = UIBuilder(UIView.self)
    .frame(CGRect(x: 0, y: 0, width: 100, height: 100))

let table = UIBuilder(UITableView.self)

let stack = UIBuilder(UIStackView.self)

UIBuilder also supports configuring existing views

let button = UIButton()
let configuredButton = UIBuilder(button)
    .title("Tap here")
    .image(UIImage(named: "hello"))


UIBuilder supports iOS 9 and higher versions, but certain properties require higher version if the project deployment target doesn’t support them

Berrium © 2022


View Github