标签: swiftui
我正在尝试在渲染前在View中调用一个变异方法,该怎么做?
View
struct MyView : View { mutating func update() { ... } // do something here var body : some View { self.update() // error, `self` is immutable ... } }