Possible Duplicate:
Disable links in UIWebView?
How can i disable the hyperlinks in a UIWebView
and make it look like a normal text?
Set this property of UIWebview
yourWebView.dataDetectorTypes = UIDataDetectorTypeNone;
First set delegate to UIWebView
when you want to use this method...
[self.webview setDelegate:sethere];
after that you can use the shouldStartLoadWithRequest:
delegate method of UIWebView
in which you add this type of logic to disable hyperlinks like bellow...
-(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType;
{
NSURL *loadURL = [[request URL]retain];
//change next line to whatever condition you need, e.g.
//[[loadURL relativeString] ....] contains a certain substring
//or starts with certain letter or ...
if([[loadURL scheme] isEqualToString: @"file"])
{
[loadURL release];
return TRUE;
}
[loadURL release];
return FALSE;
}
Also see the Reference from this webView:shouldStartLoadWithRequest:navigationType link
i hope this help you....
You can't change the content inside the UIWebView
but you can disable the UIWebView
responding to the links inside it by giving the UIWebView
a delegate and implement the following in your code:
webView:shouldStartLoadWithRequest:navigationType:
delegate method to return NO;