方法

func showModal(isPresented: Binding<Bool>) {
    isPresented.wrappedValue = true
}

类型名称
Binding<型名>

如何更改值
您可以使用wrappedValue 获取原始值。

结尾

只是一个笔记,以防你忘记


原创声明:本文系作者授权爱码网发表,未经许可,不得转载;

原文地址:https://www.likecs.com/show-308626115.html

相关文章:

  • 2022-12-23
  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2021-06-24
  • 2021-07-21
猜你喜欢
  • 2021-08-21
  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
相关资源
相似解决方案