Renderer

  • Renderer is a controller to render passed data to target immediately using specific adapter and updater.

    Its behavior can be changed by using other type of adapter, updater, or by customizing it.

    Example for render a section containing simple nodes.

    let tableView: UITableView = ...
    let renderer = Renderer(
        adapter: UITableViewAdapter(),
        updater: UITableViewUpdater()
    )
    
    renderer.target = tableView
    
    renderer.render {
        Label("Cell 1")
            .identified(by: \.text)
    
        Label("Cell 2")
            .identified(by: \.text)
    
        Label("Cell 3")
            .identified(by: \.text)
    }
    
    See more

    Declaration

    Swift

    open class Renderer<Updater> where Updater : Updater