I know about this command:
self.tableView.scrollEnabled = true
The question is: I want to lock scrolling according to the scrollView position. For this I do:
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 or unlock the scrolling immediately. For locking or unlocking the UITableView scrolling I need to release my finger from the screen and scroll again. In this case it works.
I want to make it immediately, so it locks and unlocks the scrolling while I'm swiping on the screen. How can I do it?
UPDATE
My code works. It's not a problem. Problem is that I need to make these changes immediately, without releasing my finger from the screen.
So, do not answer me how to lock scrolling! I know how to do this.
UITableView scrolls back because it's content size is equal to it's frame (or near to it). If you want to scroll it without returning you need add more cells: table view content size will be large then it's frame.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With