[Question] How blueprint manages data change and trigger view update
shuoli84 opened this issue · 2 comments
shuoli84 commented
The doc mentioned auto ui update for data change, but didn't see this in tutorial.
timdonnelly commented
Blueprint supports updating the hierarchy at any time – but it is up to the consuming app to tell it to update (there is no automatic data binding or anything).
Your code might look something like this:
final class MyViewController: UIViewController {
/// etc...
private let blueprintView: BlueprintView
// Hypothetical delegate method
func dataDidChange(data: NewData) {
blueprintView.element = MyRootElement(data: data)
}
}
shuoli84 commented
Got it. Thanks.