Good (morning, evening...).
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) }
I have one CoordinatesManger: var currentCoordinates: [ Coordinate ]
In one view I can set currrentCoordinates of CoordinatesManager, in second view I want to see Glyph with actual glyph.manager.currentCoordinates
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.
Example Playground - https://developer.apple.com/forums/content/attachment/507e87de-2094-4998-8361-b3c1dd21549c
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.
Post
Replies
Boosts
Views
Activity
I made scene: part is defined in a .scn file, bunch of boxes are added progamatically. But after export to .dae, generated boxes are broken: each side has only one triangle, half of side is empty. Also it's impossible to import this file to Blender. Blender quits. Any ideas?