objective c - How can I retrieve the HTML to be loaded into a WebView (or WebFrame) from a local persistent store? -
Then, I have a group of SQL files being stored in the SQLite database, and they will be forward and forward Intermediate links when the user clicks to follow a link, then that request should be serviced by dragging the appropriate HTML of the database. This may require images to be loaded, which are also being stored in the database (this is a future thing; there is no image yet, but I want to be able to use them). I have seen through webkit documentation, but this can not be understood at all. I have mostly seen on webformloads delaygate and WebResourceloadsDeligate, but I have not seen what I have to capture the request, catch the appropriate content, and then send it in a response.
Thoughts? I am very new to objective-c and cocoa, but I think that most of the things hangs me.
How are each other pages stored in a database link? This is probably the easiest if they start using any type of customer URL scheme.
The approach I use is to implement
-webView: resource: willSendRequest: redirectResponse: from the data source:
X-Meri-scheme: /// table / line
[1] Unless you link in your resources with custom URL scheme already - you can leave this step. Then, apply a custom NSURLProtocol for x-my-scheme
that knows how to recover data from the database. Picture Browser gives a simple example of how this sample is done. is.
Comments
Post a Comment