How to enable/disable scrolling in UITableView?
<p>I know about this command: </p>

<pre><code>self.tableView.scrollEnabled = true
</code></pre>

<p>The question is: I want to lock scrolling according to the scrollView position. For this I do:</p>

<pre><code>let topEdge = scrollView.contentOffset.y
    let followersViewEdge = CGRectGetHeight(self.profileView.frame) - 50

    if topEdge &gt;= followersViewEdge {
        self.tableView.scrollEnabled = true
    }
</code></pre>

<p>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. </p>

<p>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?</p>

<p><strong>UPDATE</strong></p>

<p>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.</p>

<p>So, do not answer me how to lock scrolling! I know how to do this.</p>