I know about this command:
self.tableView.scrollEnabled = true
The question is, I want to block the scroll according to the scrollView position. For this, I:
let topEdge = scrollView.contentOffset.y let followersViewEdge = CGRectGetHeight(self.profileView.frame) - 50 if topEdge >= followersViewEdge { self.tableView.scrollEnabled = true }
it works, but the problem is that it does not lock and does not unlock scrolling immediately. To lock or unlock the UITableView scroll, I need to lift my finger from the screen and scroll again. In this case, it works.
I want to do this immediately, so it locks and unlocks the scroll while I view the screen. How can i do this?
UPDATE
My code is working. It's not a problem. The problem is that I need to make these changes immediately, without releasing my finger from the screen.
So don't tell me how to block scrolling! I know how to do this.
source share