Hide shortcut when UITableView Cell is connected
I have a label inside my cells that I would like to show / hide when used. I know that I need to get the index path of the cell that was retrieved from didSelectRowAtIndexPath
. But I'm not sure how I then show / hide the label in that particular cell.
Is it possible to show / hide it from didSelectRowAtIndexPath
, or is there a way to deal with it in cellForRowAtIndexPath
and then update it?
I've done some research on this, but I really couldn't find much.
Here's everything I have so far:
var selectedRowIndex: NSIndexPath = NSIndexPath(forRow: -1, inSection: 0)
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
selectedRowIndex = indexPath
}
+3
source to share
1 answer