开发者

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;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜