![](/img/trans.png)
[英]SwiftUI - how can I get a method that is called to run before the rest of the function is exited
swiftUI 非常新,但我在任何地方都找不到這個答案。 提前致謝。 在 LongPressGesture 結束時,我調用了這個手勢識別器方法,它執行得很好。 唯一的問題是我想調用 showAlert() 並等待更新 annotationName 變量的文本條目。 這是我注釋圖釘的標題。 問題是 ...