4 ms·
I don't know iOS inernals, but to me it looks like they started using multiple threads for the UI? Smart when you want to update multiple areas of the screen at
by pasta 9y ago
I don't know iOS inernals, but to me it looks like they started using multiple threads for the UI? Smart when you want to update multiple areas of the screen at once, buggy when multiple areas have to sync animations?
- firmgently 9y ago'text-display' should be triggered on 'animation end', surely multi-threading wouldnt mess with that as it's an async/event-driven thing (I know nothing about multi-threading)? ...or the text could have an animated mask to reveal it in sync with the bubble animation. Either way, fairly basic stuff to implement.
- tinus_hn 9y agoThe balloon probably isn’t specified to clip the text because normally it is big enough anyway.
- tobyhinloopen 9y agoor it was made to clip, but someone else fixed a bug that was caused by clipping, so he disabled clipping, causing this bug
- aphextron 9y ago>I don't know iOS inernals, but to me it looks like they started using multiple threads for the UI? Smart when you want to update multiple areas of the screen at once, buggy when multiple areas have to sync animations? iOS has always used separate threads for UI rendering standard since GCD was added in iOS 4. This is just lazy mistakes and poor QA.
- iaml 9y agoGP is implying they started using multiple threads exclusively for UI instead of a single one.
- 0x0 9y agoI'm pretty sure that iOS renders UI on a single thread? You can't even create UIImageViews off the main thread without risking severe breakage. Fortunately, modern Xcode has an Analyze option that will flag attempts to access UI off the main thread. GCD is a nice API for scheduling async tasks but that doesn't mean those async tasks can access UIKit or OpenGL contexts safely?
- dep_b 9y agoCorrect, you need to do everything that touches the UI on the main thread. But I never ran into problems that it would lead to frame drops, scrolling frame drops are because too large calculations are done (especially on the main thread) while displaying a new cell. I don't say it's trivial always to do complex stuff in a non-blocking way but if I can do it probably somebody working at Apple can do it too.
- manmal 9y agoI‘m intrigued where you got that info. As an iOS dev, I can tell you that an app should not access UIKit stuff off-main-thread. Facebook does off-main-thread layouts [1], but they still rely on backing views on main thread. Or do you mean that the rendering/compositing itself is multithreaded? [1]: https://code.facebook.com/posts/721586784561674/introducing-asyncdisplaykit-for-smooth-and-responsive-apps-on-ios/ https://code.facebook.com/posts/721586784561674/introducing-...
- aphextron 9y ago>I‘m intrigued where you got that info. As an iOS dev, I can tell you that an app should not access UIKit stuff off-main-thread. Facebook does off-main-thread layouts [1], but they still rely on backing views on main thread. Right, I wasn't implying UIKit stuff is done multi threaded. I just meant that the best practice is to do all your UI work in the main thread, and use GCD for any blocking operations which shouldn't be on the main (animation) thread.