SwiftUI refreshes the view whenever the bool value changes since it is a state. As a consequence, the alert gets displayed if it's set to true.
確定! 回上一頁