• 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
Re: Third time I ask - please help. How to trace visible change in a UIView (UIWebView)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Third time I ask - please help. How to trace visible change in a UIView (UIWebView)


  • Subject: Re: Third time I ask - please help. How to trace visible change in a UIView (UIWebView)
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 22 Apr 2013 10:30:51 -0700

On Apr 22, 2013, at 12:26 AM, Motti Shneor <email@hidden> wrote:

> I already succeeded in capturing the contents of the view as an image-buffer (out of the CALAyer's context) and I can (brutally) solve my problem by setting up a timer that will sample the view's contents N times a second. However, I'd like to avoid transmitting anything when the view doesn't change

A quick & naive idea is to subclass UIWebView and override -drawRect: to call the inherited method and then set a timer that will capture the view's pixels a fraction of a second later. (You'd want a timer for coalescing purposes, since there are likely to be multiple calls in a short time interval.)

The reason I say this is naive is because UIWebView almost certainly has a whole tree of views inside it that do the actual drawing, so the actual -drawRect: calls are probably going to those instead. But you could give this a try and see if you get anything useful.

—Jens
_______________________________________________

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: Third time I ask - please help. How to trace visible change in a UIView (UIWebView)
      • From: Sandor Szatmari <email@hidden>
    • Re: Third time I ask - please help. How to trace visible change in a UIView (UIWebView)
      • From: David Duncan <email@hidden>
References: 
 >Third time I ask - please help. How to trace visible change in a UIView (UIWebView) (From: Motti Shneor <email@hidden>)

  • Prev by Date: Re: Temporarily disabling autosave
  • Next by Date: Re: Third time I ask - please help. How to trace visible change in a UIView (UIWebView)
  • Previous by thread: Re: Third time I ask - please help. How to trace visible change in a UIView (UIWebView)
  • Next by thread: Re: Third time I ask - please help. How to trace visible change in a UIView (UIWebView)
  • Index(es):
    • Date
    • Thread