3 ms·
On iOS, you schedule animations (and all UI updates, period) on the main thread. iOS is then free to make those happen in a non blocking way. iOS dev 101 is “do
by bobbylarrybobby 4y ago
On iOS, you schedule animations (and all UI updates, period) on the main thread. iOS is then free to make those happen in a non blocking way. iOS dev 101 is “don't do long synchronous work on the main thread because your app will lose the ability to update its UI for the duration”
- vijaybritto 4y agoIt's common for all client apps to not block the main thread be it iOS, Android or Web
- ricardobeat 4y agoScheduling an animation from the main thread is very different from running the animation on the main thread: > Once per frame, Lottie would execute code on the main thread to advance the progress of the animation and re-render its content
- meindnoch 4y agoLottie was running the animations on the main thread, via CADisplayLink. By the way, you can “schedule” animations from any thread if you use CoreAnimation directly. CALayers are thread-safe. You just need to manage the CATransaction yourself. Also, trying to explain “iOS 101” to Marcel Weiher is a bit rich…