I want to insert UIViews
dynamically with animation, based on incoming Data.
I send two asynchronous URLRequests and get the received data back from another thread.
I'm observing a property, which gets dynamically filled with data from different Requests. So KVO sends me messages, probably directly after each other.
With the first incoming message, I start a few dependent animations. During the animation time it often occurs, that new data arrives and messages my observer. I then want to wait until the animations are over and start the animations for the new data.
I'm looking for a nice implementation, not something with a while loop, waiting until a bool changes.
EDIT: Consider that I cannot say, which data comes in first. So I cannot define a animation method as the first one.