Jarrod Jarrod - 1 year ago 118
iOS Question

How can I stop reloadData on my UITableView from clearing the delete confirmation button?

So I have the following:

  • A UITableView with deletable cells (the kind where you swipe the cell then click the delete button)

  • The UITableView's properties (eg. a UILabel) are automatically updated (with a
    call on the UITableView) every second by a NSTimer (this is required)

The problem is that the
call clears the delete button after swiping (within a second of course). How can I keep this from happening?

Thank you!

Answer Source

Ok I hope it's ok to answer my own question, because after toiling for half a day I finally realised all I need to do was to set the UILabels text property from the NSTimers invocation method call and it doesn't even require a reloadData call to update the UILabel...

Pretty embarrassing that I didn't know this. But I hope my lack of understanding saves someone else the trouble :)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download