Good (morning, evening...).
I try to build SwiftUI view hierarchy for model where:
I have many Glyph objects:
It almost works but:
How to push View to redraw? Something like NSView.needsDisplay. How to trigger View to redraw, when glyph.manager.currentCoordinates are changed?
PS. It's my first post on this forum, I don't know what's the best: hide Playground file as attachment or list it in main text.
I try to build SwiftUI view hierarchy for model where:
I have many Glyph objects:
var manager: CoordinatesManager
var elements: [ ManyMultidimensionalElements ]
var path: Path { return Path(..based on elements and manager.currentCoordinates) }
var currentCoordinates: [ Coordinate ]
It almost works but:
changing manager.currentCoordinates doesn't change GlyphView, even if Glyph object see manager.currentCoordinates was changed (in manger.didSet{...})
When scrolling (why?) glyph.path is recalculated, but View stays untouched.
How to push View to redraw? Something like NSView.needsDisplay. How to trigger View to redraw, when glyph.manager.currentCoordinates are changed?
PS. It's my first post on this forum, I don't know what's the best: hide Playground file as attachment or list it in main text.