• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Waiting for UIWebView with Dispatch Semaphores
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Waiting for UIWebView with Dispatch Semaphores


  • Subject: Waiting for UIWebView with Dispatch Semaphores
  • From: Jeff Kelley <email@hidden>
  • Date: Tue, 21 Dec 2010 11:52:36 -0500

I’m trying to create a synchronous method on iOS (4.2.1) to create a
thumbnail image for a PowerPoint file. To accomplish this, I want to
load the file into a web view, then wait for it to load, then render
its context into a new graphics context and save it to an image.
Here’s what I have so far:

	http://pastie.org/1395434

I’ve tried adding the web view as a subview of the UIWindow to force
it to render, but that didn’t seem to matter. The problem is line 26:
waiting for the semaphore to be signaled blocks the thread, and the
web view won’t load. None of the delegate methods will ever be called
while I’m blocking.

Is there a way to synchronously wait for the web view? All
combinations of splitting things off on separate threads fall apart
when I try to wait for the image to be created.

Thanks in advance for any suggestions.


Jeff Kelley
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Waiting for UIWebView with Dispatch Semaphores
      • From: David Duncan <email@hidden>
  • Prev by Date: Re: Performance: Drawing hundreds of short text strings
  • Next by Date: Re: Improving drawing of UIView with many many Subviews
  • Previous by thread: Re: Improving drawing of UIView with many many Subviews
  • Next by thread: Re: Waiting for UIWebView with Dispatch Semaphores
  • Index(es):
    • Date
    • Thread