In SwiftUI, if now we have a let that’s declared contained in the View physique code comparable to:
var physique: some View {
// ...
let settingsBar = ZStack{
Picture(systemName: "gear")
.resizable()
.scaledToFit()
.body(width:buttonCircleSide/2,top:buttonCircleSide/2)
.foregroundStyle(.white)
}.body(width: buttonCircleSide, top: buttonCircleSide)
// ...
}
Is that optimized someway both by the compiler or one thing else in order that this object creation would not truly occur each time the view is refreshed? Or do we have to transfer it larger in scope? Is it not truly a “actual” project operation?