How do I notify the UITableViewController of events from a UITableViewCell subclass?
I have a gesture recognizer on each of the table view cells, and when they swipe one I want my delegate to notify the table view (or if there's a better way without delegates, that) so it can be deleted. But how do I know the cell's indexPath or whatever so it can be deleted?
Using a delegate is a good pattern to use for this. Your custom cell class should define a protocol and a delegate property. The view controller should set itself as the cell's delegate and the view controller should implement the cell's protocol method(s). Make sure one of the parameters of the protocol methods is the cell.
The view controller can ask the table view for the index path of the cell if that is needed. There is no need for the cell to know its index path. Since rows and sections can be added/deleted, it is bad form for a cell to be told what its index path since it could change at any time.