creando una vista en un hilo de fondo, agregando la vista principal en el hilo principal
Soy nuevo en el objetivo C, proveniente de .NET y Java Background.
Así que necesito crear algunas UIwebviews de forma asíncrona, estoy haciendo esto en mi propia cola usando
dispatch_queue_t queue = dispatch_queue_create("myqueue", NULL);
dispatch_async(queue, ^{
// create UIwebview, other things too
[self.view addSubview:webView];
});
como deberías imaginar esto arroja un error:
bool _WebTryThreadLock(bool), 0xa1b8d70: Tried to obtain the web lock from a thread other
than the main thread or the web thread. This may be a result of calling to UIKit from a
secondary thread. Crashing now...
Entonces, ¿cómo puedo agregar la subvista en el hilo principal?