ViewControllerのTableViewで&ダウンスワイプを検出する方法はありますか?テーブルビューでのスワイプジェスチャーの検出
ViewDidLoad()
;
let upSwipe = UISwipeGestureRecognizer(target: self, action: Selector("swipeUp:"))
let downSwipe = UISwipeGestureRecognizer(target: self, action: Selector("swipeDown:"))
upSwipe.direction = .Up
downSwipe.direction = .Down
tableView.addGestureRecognizer(upSwipe)
tableView.addGestureRecognizer(downSwipe)
残念ながら、これは機能しません。
func swipeDown() {
print("A")
}
何も返されません。
TableView(セル/全体ではない)でジェスチャーを検出する適切な方法は何ですか?
[のUITableView Scrollイベント](HTTPの可能性のある重複実装します。// stackoverflowの.com/questions/8642699/uitableview-scroll-event) – BLE
@BLE私はSwiftをお願いしていました – senty
謝罪ですが、ほとんどの意味論です。探している情報は、developer.apple.comのドキュメントのUIScrollViewDelegate部分にあります。scrollViewDidScroll(_ :) ' – BLE