开发者

UIWebView leaves behind link highlight when returning NO from "shouldStartLoadWithRequest"

If I return NO in the following method...

- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType

...the grey link highlight around the link that was pressed gets left behind. Is there someway to dismiss the highli开发者_StackOverflow中文版ght? FYI, I return NO on certain links because I want to do something other than load new content in the web view.


I came across your post today. Maybe you've already solved it but I solved it this way:

a:link {
    text-decoration: none;
    color: black;
    -webkit-tap-highlight-color: #ffcc99;
}

a:visited {
    text-decoration: none;
    color: black;
    -webkit-tap-highlight-color: rgba(0,0,0,0); 
}


I wonder if you could disable it using the following:

webView.userInteractionEnabled = NO;
webView.userInteractionEnabled = YES;


webView.userInteractionEnabled = NO;

webView.userInteractionEnabled = YES;

this can do...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜