how do i set editing style for custom UItableviewcell like this image.
this is shopping cart view ,so i am gonna have many UITableViewCell, out of other fields only Qty field is going to be editable. thanks
how do i set editing style for custom UItableviewcell like this image.
this is shopping cart view ,so i am gonna have many UITableViewCell, out of other fields only Qty field is going to be editable. thanks
The cell above looks like a custom button. What you can do is to add two UIButtons to a subclass of UITableViewCell, as well as a UITextField, and add event handling code for clicking the UIButtons to update the quantity. Since you can use an image for UIButtons achieving the above look shouldn't be difficult.
i have figure out some way, i dont know its the right way,but it works for me, but still waiting the most correct way. here is what i did,
1) i have created a IBOutlat for my UIButton in my EditCellView (subclass of UITableviewcell)
2) and then i create IBAction in my tableviewcontroller
3) then i set UIButton Touch in event to IBAction in tableviewcontroller
4) in IBaction method you can get that cell using this code
EditItemController *cell = (EditItemController *)[[sender superview] superview];
NSIndexPath *indexPath = [self.maintable indexPathForCell:cell];
this line of code may depends on your view layout
[[sender superview] superview]
to get correct superview you can use following command in gdb
gdb>po [[sender superview] superview]