preventing user input between animated views

Is there a simple way to prevent user input between animated views ?


For example I click a button, i have a 2 second animation, and the UI is not clickable for 2 seconds whil preresenting the animation ?


By default the second view is immediately clickable, which is not what I want


Thanks for your ideas.

Could you try to set the view userInteraction

SomeView()
.allowsHitTesting(false)

or another example

ZStack{
  SomeView().blur(radius: 12)
  Rectangle()
  .fill(Color.white.opacity(0))
  .allowsHitTesting(false)
}


See full discussion:

https://stackoverflow.com/questions/29068243/swift-how-to-disable-user-interaction-while-touch-action-is-being-carried-out

preventing user input between animated views
 
 
Q