2

I have a html string which contains <img> tag with a image URL. I have loaded the html string as follows using grand central dispatch.. But my app stuck till the images fully loaded..help me please `

background=dispatch_queue_create("background_queues", NULL);

dispatch_async(background, ^{    

    [webView loadHTMLString:myDescriptionHTML baseURL:NULL]; });

dispatch_release(background);

Thanks in advance..

Pranjal Bikash Das
  • 1,092
  • 9
  • 27

1 Answers1

2

You can't make UIKit calls on a background thread. What's the point of this code? If you just call loadRequest: on the main thread, it won't block the UI while your image loads.

Christopher Pickslay
  • 17,523
  • 6
  • 79
  • 92