UIScrollView行为在iOS8中是不同的 [英] UIScrollView behavior is different in iOS8

查看:183
本文介绍了UIScrollView行为在iOS8中是不同的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下布局

因此,它基本上是一个滚动视图占据整个屏幕。内容大小设置为三重宽度和相同的高度。在滚动视图内 - 有容器视图和三个表视图 - 每页一个。只有中间表视图初始可见。

So it's basically a scroll view that occupies whole screen. Content size is set to triple-width and same height. Inside the scroll view - there is container view and three table views - one per page. Only middle table view is visible initially.

这允许我使用滚动视图水平滚动在表格之间导航和中间表格内的垂直滚动。

This allows me to use scroll view horizontal scrolling to navigate between the tables and vertical scrolling inside the middle table.

我知道苹果真的不推荐将UITableView放在UIScrollView中,但在这种情况下,我不知道如何实现它,直到iOS8工作正常。

I know that Apple doesn't really recommend putting UITableView inside UIScrollView, but in this particular case I don't know how to implement it differently, and until iOS8 everything was working fine.

UIScrollView无法识别任何垂直滚动(因为内容高度等于滚动视图高度),这些手势直接传递到UITableView。

UIScrollView would not recognize any vertical scrolling (since content height was equal to scroll view height) and these gestures were passed directly to UITableView.

但是从iOS8开始 - 这变得破碎。 UIScrollView将允许一些垂直滚动和基本拦截发送到UITableView的滚动手势。

But starting in iOS8 - this getting broken. UIScrollView would allow some vertical scrolling and basically intercept scrolling gestures sent to UITableView.

我创建了一个简单的项目,在iOS7中运行正常,但在iOS8中打破了。任何人都有任何想法如何解决这个问题?

I created a simple project that works fine in iOS7 but is broken in iOS8. Anybody has any idea how to fix this problem?

链接到项目: https://dl.dropboxusercontent.com/u/6402890/TablePaging.zip

推荐答案

我没能解决这个问题,正如我在注释中提到的,必须重写逻辑使用内置的 UIPageViewController 类。

I haven't been able to solve this and as I mentioned in comments had to re-write logic using built-in UIPageViewController class.

这篇关于UIScrollView行为在iOS8中是不同的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆