Thanks Marco, Actually, we use the UIWebView not to display HTML contents, but because it so easily provide multi-document-format display.
We will probably use it most for displaying PDF documents, Image files, Word documents, etc. Anyway, it will display a single, static, local document (not from the net). The user will "share" a document, and the document will be both displayed, and "shared" to other people through the server. Moreover, I doubt the efficiency of comparing HTML contents vs. comparing images, where I can very easily use the GPU to subtract pixel from pixel, then scan for non-zero data. To be very precise --- I'd like to know how to be notified about ANY UIView visual change. It somehow seems very obvious to me that such "delegate call" must exist. Maybe I'm overlooking something very basic here. Was it MY view, I'd "ride" the drawRect: I think. but again, I'm not sure on iOS, if you pinch a view to zoom-out, whether drawRect is called or not. Thanks again!. On 22 באפר 2013, at 15:29, Marco Tabini <mtab...@me.com> wrote: > On 2013-04-22, at 3:26 AM, Motti Shneor <su...@bezeqint.net> wrote: > >> 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. > > If your UIWebView is displaying an HTML document, you could potentially > inject some Javascript to watch for DOM changes on the <html> tag (Google > “WebKitMutationObserver”); when a change is detected, your Javascript can > force-load a URL with a custom scheme, which you can then trap inside your > Objective-C code, where you can capture the view's state. > > There are other ways to achieve this, but this is the only one I can think of > that might (a) capture all changes and (b) be in line with Apple's review > guidelines. Note, however, that I haven't tried it, so it might not work at > all for a number of reasons :-) > > > —Mt. > Motti Shneor ---------------------------------------- Ceterum censeo Microsoftinem delendam esse _______________________________________________ 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