我有一个嵌套的滚动视图情况,如下面 -
mainView-> ScrollView1-> ScrollView3(有很多子ScrollView垂直)
*我希望当用户向下滚动时,首先滚动浏览器将滚动显示的childScrollView3.(scrollView2的用户交互以及滚动应该被禁用)*
2)*在它到达终点后,childScrollView3将以scrollView1滚动的相同速度滚动?*
当用户向下滚动时也应该发生同样的情况,即childScrollView3将首先结束,然后scrollView1将滚动到顶部.
UPDATE
马克 - 我在goole上搜索视差,但这没有用,因为我有一个带有多个垂直子滚动的分页滚动视图.
我正在尝试计算tableView的内容大小高度,它具有动态增加的单元格.为此,我正在编写代码 -
override func viewDidLoad()
{
super.viewDidLoad()
self.tableView.estimatedRowHeight = 150
self.tableView.rowHeight = UITableViewAutomaticDimension
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
{
let cell = tableView.dequeueReusableCellWithIdentifier("cell1", forIndexPath: indexPath) as! MostLikedTVCscnd
cell.image.image = imageArr[indexPath.row] as? UIImage
cell.aboutLbl.text = labelArr[indexPath.row] as? String
let contentSizeHeight = tableView.contentSize.height//But here I am not getting the proper height
return cell
}
Run Code Online (Sandbox Code Playgroud)
我检查的问题的答案计算的tableView内容大小- /sf/answers/1255795691/ 读取
注意那些对他们来说,这是行不通的 - 的tableView:与contentSize estimatedHeightForRowAtIndexPath混乱,所以你可能有运气只是通过删除您的IT实施. - weienw
那么,尽管有动态单元格大小,我还能获得正确的内容大小吗?