I'm using accessoryView, not button. This means I can't use the "accessoryButtonTappedForRowWithIndexPath" method. Itried to add a tap gesture recognizer to my view, but it won't work for the following reasons:
I need the indexPath of the selected accessoryView, so I can't call a generic "cellAccessoryTapped()" function since it wouldn't have the index path.
I can't pass in any parameters into the selector as to pass in my index path.
Here is the code for my accessoryView:
let ellipsesImageView = UIImageView(image: UIImage(named: "ellipses-nav-bar-icon"))
cell.accessoryView = ellipsesImageView
cell.accessoryView?.tintColor = Theme.Color.Primary.primaryBlack
cell.accessoryView?.userInteractionEnabled = true
let cellTapGestureRecogznier = UITapGestureRecognizer(target: self, action: #selector(self.tableView(_:accessoryButtonTappedForRowWithIndexPath:)))
cell.accessoryView?.addGestureRecognizer(cellTapGestureRecogznier)
The app crashes when I tap on a cell, and doesn't go into the table view method at all, so I do not think I'm permitted to use it.
How would I go about finding the index path of the cell given the selected accessory view?