I am using iCarousel library to load UIWebViews. I am unable to scroll the carousel when i swipe on the center view. When i swipe outside the centre View, I do not have any problem in scrolling. I do not have the similar problem when i use UIImageView. I am facing this problem only for UIWebview. I am using the below code to create the web views in viewForItemAtIndex method.

-(UIView *)carousel:(iCarousel *)carousel1 viewForItemAtIndex:(NSUInteger)index reusingView:(UIView *)view {
    UIWebView *webView = [[UIWebView alloc]initWithFrame:CGRectMake(50, 0, 100, 100)];
    return webView;
}

Can anyone please help me to fix this issue?

有帮助吗?

解决方案

This is probably a gesture recognizer issue preventing the carousel pan gesture from working. It seems you can't set your controller as the delegate of the webView.scrollView.panGestureRecognizer so, you will need to edit the carousel because it doesn't make the panGestureRecognizer it uses publicly available. Edit it to add your controller as the delegate and then you can return YES from gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:. Alternatively, you can hide this inside the carousel by making it the delegate of its own gesture...

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top