Zephyr
Zephyr

Reputation: 11

'Type of expression is ambiguous without more context'

Im having been having this odd problem while coding in my Swift file As soon as I inserted the '.animation' it gave me this error. Is anyone able to help me with this problem?

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())
}

enter image description here

Upvotes: 1

Views: 360

Answers (1)

E.Coms
E.Coms

Reputation: 11539

.animation(.easeInOut) which has no parenthesis after .easeInout

Upvotes: 0

Related Questions