i'm trying to implement a TableView where each cell has a '+
' button just like the iPod app when adding songs to a playlist.
The cell.accesoryType
has only four values
UITableViewCellAccessoryCheckmark
UITableViewCellAccessoryDetailDisclosureButton
UITableViewCellAccessoryDisclosureIndicator
and
None
How can this be done? Do i need to create a custom button and set the cell.accessoryView
or is there another way to do this?
Teo's solution works great, but it's not been posted as an answer, so I'm reposting it:
UIButton *button = [UIButton buttonWithType:UIButtonTypeContactAdd];
[button addTarget:self action:@selector(addbuttonTapped) forControlEvents:UIControlEventTouchUpInside];
cell.accessoryView = button;