Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add "Plus" button for AccessoryType TableView

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?

like image 565
teo Avatar asked Jun 11 '11 08:06

teo


People also ask

Can I add a plus and minus button for each product?

We can now add a plus and minus button for each product on either the archive product page or the single product page. This can be extremely useful for both pages, to be honest.

What is the formula for the plus button in the edit form?

The default edit form displays the record that's currently selected in the Browse Gallery on the initial screen (BrowseGallery1) Therefore, the formula for your plus button would look something like this: Patch(SharePointListName, BrowseGallery1.Selected, {InStockAmount: InStockAmount +1} )

What is the formula for the plus button in SharePoint?

Therefore, the formula for your plus button would look something like this: Patch(SharePointListName, BrowseGallery1.Selected, {InStockAmount: InStockAmount +1} )


1 Answers

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;
like image 124
JosephH Avatar answered Oct 06 '22 01:10

JosephH