iOS滑动UITableView

时间:2015-11-19 20:59:50

标签: ios swift

我正在寻找类似的实现:https://github.com/umano/AndroidSlidingUpPanel 但对于iOS。目前我有一个带有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,但是我没有找到在滚动列表时触发的方法。有没有?

1 个答案:

答案 0 :(得分:0)

在UIScrollViewDelegate中滚动时,您没有找到触发的方法?!? : - )

https://developer.apple.com/library/prerelease/ios//documentation/UIKit/Reference/UIScrollViewDelegate_Protocol/index.html

  • scrollViewDidScroll:
  • scrollViewWillBeginDragging:
  • scrollViewWillEndDragging:withVelocity:targetContentOffset:
  • scrollViewDidEndDragging:willDecelerate:
  • scrollViewShouldScrollToTop:
  • scrollViewDidScrollToTop:

选择一个配偶: - )

相关问题