Target of this post is to create an easy-to-use progress indicator class written in Swift 4.0.
In this post we need to define a set of actors in order to make it clear how to write the best API.
- End user – part of code that creates / calls API
- Developer – we write the actual code, so we call ourselves like this
- Supporter – person / AI that is going to support the code after we’re done
Required features are limited to the following:
- Create different shapes to be animated
- Create different animation direction / paths
- Set animation duration
- Animation control (pause/resume/manual)
- Change animation duration “on-the-fly”