开发者

Scrolling Problem on using UIWebView in UITableViewCell

I created the instance of the UILabel and added it as the subView of the contentView which is embedded in the table view cell.

Then I created web view (from UIWebView) and added it as the subView on the previously created label. (web view is smaller than label)

And then scrolling over the label, I found that if touch occurs inside of the web view, scrolling of the table view doesn't work well. It seems that web view captures all the touch events so that its parent (label) doesn't get any touches. But if touch occurs in the label outside of the web view, scrolling of the table view works well.

I know that if I set setUserInteractionEnabled of web view to 'NO', this problem will be fixed. But web view has some important links that should not be disabled.

Is there any way to make scrolling of the table view work well without disabling user interaction of the web 开发者_StackOverflow中文版view?

Thanks in advance.


Isn't it a problem caused by your webview trying to scroll ? try

[[[myWebView subviews] lastObject] setScrollingEnabled:NO];


have you tried - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event returning the tableView?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜