Swift-Add disclosure indicator to a UITableViewCell

That arrow isn’t a UINavigationItem; it’s a UITableViewCellAccessoryDisclosureIndicator.

To add that UITableViewCell.AccessoryType.disclosureIndicator “arrow” to your cell’s accessory view, add this line:

cell.accessoryType = UITableViewCellAccessoryType.DisclosureIndicator

And then to perform a specific action when that accessory view is tapped, implement tableView:accessoryButtonTappedForRowWithIndexPath:.

Leave a Comment