is there a way to animate an UIActivityIndicator while constructing a complex UIView hierarchy? I have a complex hierarchy, to be added via 'addSubview:' in 'viewDidLoad' (in a mostly storyboard project, but this scene is dynamically created). Not fiddling with GCD, the UI blocks as long as initialization takes. Putting the initialization into 'dispatch_sync' (shown below) does not display/animate the indicator, putting it into 'dispatch_async (dispatch_get_global_queue (0,0),...' creates a crash (because UIKit code needs to run on main queue?), and putting it into 'dispatch_async (dispatch_get_main_queue(),...' creates a deadlock (as announces by Apple, I guess).
-(void)viewDidLoad {
dispatch_sync (dispatch_get_global_queue (0,0), ^{
// initialization here
})
}
So what is the direction to go?