Closed christophaigner closed 5 years ago
The builder pattern allows you to create an instance and setting it up in a simple way.
Instead of writing e.g.
private let tableView: UITableView = { let tableView = UITableView() ... // setup code here return tableView }
you can use the builder pattern and save 2 lines for every property you create.
private let tableView = UITableView(frame: .zero, style: .plain).with { tableView in ... // setup code here }
Description
The builder pattern allows you to create an instance and setting it up in a simple way.
Instead of writing e.g.
you can use the builder pattern and save 2 lines for every property you create.