Let's be plain about it: UIKit (which basically cover all of the UI Thread territory) isn't thread safe and the things that draw the view hierarchy run on the main thread. The rare exceptions are outstanding enough that they get mentioned explicitly in the documentation as being thread safe or being designed to run in another thread/queue.On the other hand, it really depends on what you're doing and what sorts of latency you're allowing for how much you can offload to another thread. Because the straight forward way of offloading things that were originally done on the main thread to a background thread ends up looking a lot like this: You've got an action method that's responding to the user tapping a button. Gather up all of the relevant parameters and dispatch a block to the worker queue.Inside that worker block, do the computation and work. Gather up the relevant results and dispatch a block to the main queue. Inside this second block, use the passed in results to update the user interfa
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: