我在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())
}
答案 0 :(得分:0)
.animation(.easeInOut)
,. easeInout后没有括号