Assume we have one UIViewController, call it A, in the viewDidLoad of that VC we add to it two UIViewControllers( B,C ). now to make the UI smooth in the viewDidLoad of A we do some GCD work
dispatch_queue_t queue = dispatch_queue_create("myqueue", NULL);
dispatch_async(queue, ^{
// Create webviews, do some setup here, etc etc
// Perform on main thread/queue
dispatch_async(dispatch_get_main_queue(), ^{
// this always has to happen on the main thread
[self.view addSubview:webView];
});
});
So the ParentViewController is somewhat better in UI rendenring.
My question is: Is this enough GCD work? or should I do the same thing in thew viewDidLoad of the child viewcontrollers? just because I created those child VC's on a background thread does that mean I need not do any GCD wokr on them? I am trying to make my UI as responsive as possible, but not clutter the code. I guess another way of wording this would be are GCD threads reentrant? is there a concept of reentrancy in iOS?