📜  快速切换更改 - Swift 代码示例

📅  最后修改于: 2022-03-11 15:01:00.378000             🧑  作者: Mango

代码示例1
Toggle(isOn: $state){
  Text("This is a toggle")
}
.onChange(of: state) {
  // The action you want to trigger
}