开发者

UIWebview in iPad

1) I load a URL in UIWebview ,which has some images .I want to enable the option,"save photo" which appears when you long-press the images in webview.Currently this option 开发者_StackOverflowis available in Safari Browser.But I couldn't find any option in UIwebView class, And UIdataDetectorType struct dont have option for images (as of my knowledge.)

So how do I have this in my APP?

2) when I open some PDFs in webview ,I want to provide an option to open the pdf in iBooks. How to do?

Thanks in advance.

GopiKrishnAn


I think this should be 2 separate questions.

1/ Read this blog post by iCab's author: Customize the contextual menu of UIWebView. It shows you exactly how to implement long press detection in a UIWebView.

As a bonus, his blog is a wealth of useful information about UIWebView.

2/ You need to work with UIDocumentInteractionController. As its initialization method (+ (UIDocumentInteractionController *)interactionControllerWithURL:(NSURL *)url) only works with a local URL, I guess you need to download the PDF and save it somewhere before you are able to provide such options.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜