Remove interactions and gesture recognizers from recycled section headers. Issue #1432

This commit is contained in:
Maurice Parker 2019-12-11 14:29:32 -07:00
parent e90c6d1395
commit b95a692876

View File

@ -211,10 +211,12 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
headerView.isLastSection = false
}
headerView.gestureRecognizers?.removeAll()
let tap = UITapGestureRecognizer(target: self, action:#selector(self.toggleSectionHeader(_:)))
headerView.addGestureRecognizer(tap)
if section != 0 {
headerView.interactions.removeAll()
headerView.addInteraction(UIContextMenuInteraction(delegate: self))
}