I need to do the following animation with an audio clip, on repeat:
- Show image1, image2 and image3 for one second in total (0.33 seconds each)
- Show image4 for five seconds and play an audio file.
- Show image5 and image6 for one second each
- Repeat 3 times
Ideally, I’d like to create an animation, start it animating and leave it to do it’s stuff. i.e. create a UIImageView, build the “animations” array with images, and call “startAnimating”. But to do this I’d need to include image4 15 times and images 5 and 6 3 times so the animation is correct. I’d also have to schedule the audio for every 2nd second of every 8 second loop.
What other options do I have for creating this type of multi-stage animation? Should I handle each part separately, with a delegate callback when the animation finishes, which prompts me to then animate the next part of the sequence until the entire animation has repeated 3 times?
Any advice much appreciated. Thanks guys.
just a quick rough thought, not been practiced with real code:
holds a number of viewcontroller instances
(described in 2), remember configure them as desired, and assign
their delegates to main viewcontroller
viewcontroller either by presentingModalViewController
array
(described in 3)
again, just a quick idea