UITableView Scroll event

前端 未结 3 1440
渐次进展
渐次进展 2020-11-29 09:12

I want to detect if mytable view has been scrolled, I tried all touch events like this one:

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
         


        
3条回答
  •  春和景丽
    2020-11-29 09:22

    These are the methods from UITableViewDelegate for Swift 3 to detect when an UITableView will scroll or did scroll:

    func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
    
    }
    
    func scrollViewDidScroll(_ scrollView: UIScrollView) {
    
    }
    

提交回复
热议问题