简体   繁体   English

flowcover 视图替代方案(使用 uiwebview 不使用 uiimage)

[英]flowcover view alternatives (with uiwebview not with uiimage)

I tried fajowski's cover flow view.我尝试了 fajowski 的封面流视图。 I was able to understand the most part of the changed the uiview to uiwebview.我能够理解将 uiview 更改为 uiwebview 的大部分内容。 the problem now i am facing is the horizontal scroll is not working at all.我现在面临的问题是水平滚动根本不起作用。 This is because of webviews inserted into a scrollview.这是因为 webviews 插入到了滚动视图中。

Important: You should not embed UIWebView or UITableView objects in UIScrollView objects.重要提示:您不应在 UIScrollView 对象中嵌入 UIWebView 或 UITableView 对象。 If you do so, unexpected behavior can result because touch events for the two objects can be mixed up and wrongly handled.如果这样做,可能会导致意外行为,因为两个对象的触摸事件可能会混淆并错误处理。

source: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWebView_Class/Reference/Reference.html来源: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWebView_Class/Reference/Reference.html

What i am asking for is this.我要的是这个。 Is there any other way where i can mimic the same flow cover view with a uiwebview without any horizontal scroll issues.有没有其他方法可以让我用 uiwebview 模拟相同的流盖视图,而不会出现任何水平滚动问题。

If you don't want the web views to be interactable then you can likely just myWebView.userInteractionEnabled = NO;如果您不希望 web 视图可交互,那么您可能只myWebView.userInteractionEnabled = NO; to fix your odd scrolling issues.解决您奇怪的滚动问题。 This way, the web views won't trap any touch events that the scroll view should be getting.这样,web 视图不会捕获滚动视图应该获取的任何触摸事件。

Otherwise...hmmm no not really.否则......嗯,不,不是真的。 If the above approach doesn't work you could try painting the web view to a graphics context and extracting an image from it, at which point you could use the stock flow component.如果上述方法不起作用,您可以尝试将 web 视图绘制到图形上下文并从中提取图像,此时您可以使用库存流组件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM