【发布时间】:2019-12-04 19:16:06
【问题描述】:
我在我的 Swift 文件中编码时遇到了这个奇怪的问题,当我插入“.animation”时,它就给了我这个错误。有人能帮我解决这个问题吗?
Button(action: {
self.showDetail.toggle()
}) {
Image(systemName: "chevron.right.circle")
.imageScale(.large)
.rotationEffect(.degrees(showDetail ? 90 : 0)) // <- Type of expression is ambifuous without more context
.padding()
.animation(.easeInOut())
}
【问题讨论】:
-
欢迎来到 SO!为了可读性,建议粘贴代码而不是图像。另见How to Ask。另外,显示更多代码。