I want to restrict the users from using the links in a UIWebView. Hence, showing only single a HTML page with no navigation.
I know I can do that using the "User Interaction" option of UIWebView but I can't use that since it disables scrolling as well, and the user cannot view the complete page.
Any ideas?
My situation demanded that a user really can ONLY look at the page, but not interact at all (specifically with respect to copying content--it was a security issue). Here's what I did:
for (UIView *thisView in webView.scrollView.subviews)
{
thisView.userInteractionEnabled = NO;
}
If you don't mind them seeing the links, you could use a UIWebViewDelegate to detect when a page begins loading and cancel it.
If you don't want them to see the links at all, you could modify the HTML before rendering it. Using libxml is pretty easy's and it's htmlparser.h can probably do what you need. If you don't like that, HTML tidy works well too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With