This is the full runnable sample code for the "Custom Block-Based Animation API" example from my article "View-Layer Synergy" for objc.io issue 12:
Note:
This is meant as an example of how the interaction between views and layers could be used to build a custom block based animation API. As such, this isn't a production ready animation API itself.