
[英]Animate a View to a selected cell in collectionView or tableView in scrollView
[英]Adding dimming view when tableView cell passes from the middle of scrollView
我有scrollView。 在这个scrollView中我有另一个视图。 在这个视图中我有tableView。
滚动型>查看>的TableView
tableView的单元格是自定义的,并在其中包含标签。
当标签通过scrollView的中心时,我需要显示一个dimmingView,只有标签可见。
所以我必须使用scrollViewDidScroll和inside添加:
let rectOfCell = theTableView!.rectForRow(at: IndexPath(row: 0, section: 0))
let rectOfCellInSuperview = theTableView!.convert(rectOfCell, to: scrollView)
我不知道这段代码是否会起作用,因为我不知道如何将调光视图仅显示标签。
标签的矩形经过scrollView的中间后,我需要显示调光视图。 怎么做 ?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.