Hello everyone. I asked this several times before, but no one gave any hint -- I'd like to know if anyone here has any clue, at least where to search for an answer.
I need to observe the visible contents of a UIWebView dIsplayed in my iOS application. Each time the visible contents changes, I need to capture the contents as image, and transmit it to our server. A bit like screen-sharing on the Mac, but not for the whole screen contents, just a single view. 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, and I want to avoid comparing image-buffers N times a second (frame-differencing) on iOS devices, which is battery abuse. I DO NOT wish to re-transmit when the user rotates his iOS device and the view rotates. However I DO want to re-transmit when the user pinches to zoom in and out, or scroll through the view's contents. Also, I do not want the whole contents transmitted. just the visible part of it. This is why I'm not sure I need to "ride" the "drawRect" thing. I'm not sure a view must redraw when it undergoes visual translation/rotation/scaling etc. I started looking for the right delegate call, and quite soon got lost. My background is Cocoa on MacOS and iOS view/CALayer system still confuses me. This UIWebView might have subviews I'm not aware of, and it will usually be rendering a document file (such as PDF) via a given URL. The "right" way as I see it, is to get notified when the UIWebView decides to re-display or redraw its contents after something changes. (either content change - redrawing, or some user manipulation zoom, rotate, translate, animation). Can anyone hint on where to start here? I'll be grateful for any hint or direction. Thanks. Motti Shneor _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com