我正在尝试像文档所说的那样实现PresentationButton,但这并不起作用。
这是针对Xcode beta 2的
PresentationButton(destination: LoginScreen(),
label: Text("Login"))
我收到此错误“无法将'Text‘类型的值转换为预期的参数类型'() -> _'”
发布于 2019-06-19 01:53:09
应该是这样:
PresentationButton(destination: LoginScreen(),
label: { Text("Login") })
或者这样:
PresentationButton(destination: LoginScreen()) { Text("Login") }
而不是。
https://stackoverflow.com/questions/56653946
复制相似问题