Is it possible to add observer to tableView.contentOffset?
问题 I need to track tableView.contentOffset.y Is it possible to add observer to tableView.contentOffset? I think this is impossible because contentOffset doesn't inherit NSObject class. Is any other solution? 回答1: UITableView is a UIScrollView subclass so you can use the UIScrollViewDelegate method scrollViewDidScroll: to be notified when the view scrolled. Check the contentOffset of the scrollView in that method contentOffset is a key path, so you can also observe its changes using KVO [self