stanford2020 icon indicating copy to clipboard operation
stanford2020 copied to clipboard

Rotating Emojis

Open udarts opened this issue 3 years ago • 1 comments

How can I rotate Emojis?

I have been trying to create it, but unsuccesfull.

Any assistance?

udarts avatar Jan 15 '22 21:01 udarts

The animation for rotating emojis is in the struct CardView with .rotationEffect(Angle.degrees(card.isMatched ? 360 : 0)) and also, to rotate the second emoji first it has to be present on the screen, therefore, in Cardify the content is set out of the if rotation but with an opacity so it can't be seen content.opacity(rotation < 90 ? 1 : 0) like that

JHeisecke avatar Mar 20 '22 13:03 JHeisecke