Re:Try quickly typing 1+ 2 + 3 into the iOS 11 Calculator
by bcherny on Tuesday October 24, 2017 @12:27AM
(#15539220)
Does iOS runtime not use evented I/O? Coming from web, I would expect tap events to queue up while the thread is busy with an animation.
[ Parent
| on HN ]
Re:Try quickly typing 1+ 2 + 3 into the iOS 11 Calculator
by xenadu02 on Tuesday October 24, 2017 @03:10AM
(#15539778)
CoreAnimation runs animations on a background thread using state snapshots.
The event loop is processing events during the animation. It is up to the programmer to decide if events are ignored or processed during animations because what that means depends on what you want to happen: is the animation interactive and reversible? Does tapping reset the animation or does it start animating to the new state from its existing state?
CoreAnimation does the work based on the policies you select (eg: interpolating between a half-complete animation and the new desired end state).
Re:Try quickly typing 1+ 2 + 3 into the iOS 11 Calculator
by LeoNatan25 on Tuesday October 24, 2017 @05:42AM
(#15540389)
Correction—CA animations process and render in a render server process. This is why even when the main thread is blocked, animations can continue.
Re:Try quickly typing 1+ 2 + 3 into the iOS 11 Calculator
by tedunangst on Tuesday October 24, 2017 @12:36AM
(#15539240)
While the button is animating, it simply doesn't respond to touches. There's no thread that's stuck. 1 + 2 - 3 consistently produces the correct result because + and - are different buttons.