我正在寻找一个类似的实现:用于iOS的https://github.com/umano/AndroidSlidingUpPanel。目前我有一个带UITableView的ViewController。我覆盖了这个方法,这样我就可以在点击时展开列表:
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
print("selected: \(indexPath.row)")
self.view.layoutIfNeeded()
UIView.animateWithDuration(1, animations: {
self.mTableViewTopConstant.constant = 200
self.view.layoutIfNeeded()
})
}我现在想要的是:如果列表被展开,滚动位置在顶部,当我在列表上向下移动手指(快速滑动)时,列表应该会折叠。此外,如果可能,当我移动手指时,列表应该遵循我的方向。我深入研究了UIScrollViewDelegate,但我没有找到在滚动列表时触发的方法。有吗?
发布于 2015-11-20 05:14:41
您没有找到在UIScrollViewDelegate中滚动时触发的方法?!?:-)
选择一个伴侣:-)
https://stackoverflow.com/questions/33814258
复制相似问题