3 ms·
I'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, mod
by 0x0 9y ago
I'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.