Initializing `Renderer` without passing the target instance.
ra1028 opened this issue · comments
Ryo Aoyama commented
Checklist
- Reviewed the README and documents.
- Searched existing issues for ensure not duplicated.
Description
Allow Renderer
to be initialized without passing the target instance.
Motivation and Context
Become no need to add lazy
to renderer
property declarations.
Also, the timing when delegate and dataSource are set in tableView becomes explicit.
Depending on when delegate and dataSource are set, cases have been found where unnecessary space is available above or below the tableView.
Proposed Solution
@IBOutlet weak var tableView: UITableView!
let renderer = Renderer(
adapter: UITableViewAdapter(),
updater: UITableViewUpdater()
)
func viewDidLoad() {
super.viewDidLoad()
renderer.target = tableView
}