如果有人关心我已经解决了这个问题,只需将 uiwebvies 添加到一个可变数组中,然后首先在滚动视图中切换它们(可见),然后再将它们切换到该可变数组中(逻辑上)。在上面链接的示例中,“向右滚动”(在 scrollViewDidEndDecelerating:) 中的代码如下所示:
CGRect frame = ((UIView*)[self.arrWebViewsContent objectAtIndex:2]).frame;
((UIView*)[self.arrWebViewsContent objectAtIndex:2]).frame = ((UIView*)[self.arrWebViewsContent objectAtIndex:1]).frame;
((UIView*)[self.arrWebViewsContent objectAtIndex:1]).frame = ((UIView*)[self.arrWebViewsContent objectAtIndex:0]).frame;
((UIView*)[self.arrWebViewsContent objectAtIndex:0]).frame = frame;
UIView *view_tmp = [self.arrWebViewsContent objectAtIndex:0];
[self.arrWebViewsContent replaceObjectAtIndex:0 withObject:[self.arrWebViewsContent objectAtIndex:1]];
[self.arrWebViewsContent replaceObjectAtIndex:1 withObject:[self.arrWebViewsContent objectAtIndex:2]];
[self.arrWebViewsContent replaceObjectAtIndex:2 withObject:view_tmp];