Table row deletion in Iphone
I have a with Table editing in iPhone. I'm using Delegate a开发者_JAVA百科nd Datasource in my project. The problem is when we click Delete disclosure, i'm not getting Delete button. I'm a newbie in iphone programming. So please help me. Thanks in advance.
You need to implement the methods
-(UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
{
return UITableViewCellEditingStyleDelete;
}
-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
You also need to make sure the tblView.editing property is set to true;
精彩评论