I want to implement a UITableView
that when I press a button in my ViewController
, I can see the delete button on the right of the cell, but not the red minus circle on the the left of the cell.
Any ideas on this?
Just an approach:
isDeleteEnabled
(or whatever you name it) to TRUE
UITableView
and in cellForRowAtIndexPath
check for that BOOL valueTRUE
then load the all the UITableViewCell
as custom cells
with delete button on it (You need to set the selector method for
deletion of a row)isDeleteEnabled
UITableView
and this time in cellForRowAtIndexPath
check the value of isDeleteEnabled
- which will be FALSE
. So, you need to load normal(or your original) UITableViewCells.I have done the very similar thing following this approach.
Also, I haven't posted the code for it for three reasons:
that simple if you dont want the minus sign to appear, consider implementing you own solution than default one, insert a delete button and provide an animation to it, do as you require
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With