Search code examples
iphonensarraylabeluiactionsheet

iphone UIActionSheet


I have used two different NSArray to display data in two different labels in a custom TABLE VIEW. How can I delete a cell from the table view using UIActionSheet (using UIActionSheet's destructive button) such that the data also gets deleted from the NSArray?


Solution

  • You have to remove it from arrray [arrayName removeObjectAtIndex:indexPath.row];

    And then reload the table:

    [table reloadData];