I’m using UITableViewCell.
I’d like to programatically change the UITableViewCell’s mode from Delete to Edit when user is canceled delete.
Please let me know how to change.
Thank you for your help.
Here is trying code.
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex {
UITableViewCell *aCell;
aCell = [self tableView:gbl_tableView cellForRowAtIndexPath:gbl_indexPath];
if (buttonIndex == 0){
NSUInteger row = (NSUInteger) [gbl_indexPath row];
[userListStr removeObjectAtIndex:row];
[userImage removeObjectAtIndex:row];
[gbl_tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:gbl_indexPath]
withRowAnimation:UITableViewRowAnimationAutomatic];
}
else if (buttonIndex == 1) {
// When user canceled.
[aCell setEditing:NO animated:YES]; <==== ??? I can't know how.. This code don't work.
}
}
from delete to edit -> 
Is it possible
aCellis null/nil? I believe the proper way to pull the cell form the UITAbleViewController is something like:In your case it would be