-1

I want to bookmark urls, which are shown in my webview. My app has a slide out menu with the cell "bookmarks". If the user presses this cell, a table view should appear and show him all the bookmarks, which were created through a "add as bookmark" button within the webview. Can someone maybe give me a code example how to do this? The bookmark name must be the url-string after the last "/" of the website url. Any help would be appreciated. Thanks!

1 Answer 1

0

To implement above functionality you need to create one screen with one webview inside it with a button on top which will act as Add Bookmark. Now when ever you browse the UIWebview then it will have some url which is getting displayed. Now if you need to save this particular url as your bookmark then you just need to implement one delegate method of UIWebview which will give you this url and then you can just save these urls in any local DB and can open them and show them as you want. The delegate method for webview is below

- (void)webViewDidFinishLoad:(UIWebView *)webView{
     NSURL *currentURL = [[webView request] URL];
     NSLog(@"%@",[currentURL description]);}

Not the answer you're looking for? Browse other questions tagged or ask your own question.