ios - Disabling Delete button in UITableView temporarily -
the delete button on app i'm working on makes server call when tapped.
however while waiting server respond, able click delete button multiple times, , hence sending out multiple server request.
i looking @ solution want disable delete button until hear server. possible? or there graceful solution this? or doing wrong in first place.
thanks!
it appears when show delete confirmation button in table cell, , user taps button, handle deletion in usual commiteditingstyle
delegate method.
but sounds kick off server request , while executing, delete button still in view. implies don't delete row until server request complete.
if case should in commiteditingstyle
method reload row being deleted. remove delete button. kick off server request. once server request done, update data source appropriate , delete row or reload table or section needed.
it might nice add little activity indicator cell letting user know row being processed. may want prevent user swiping on row again while server request in progress.
Comments
Post a Comment