开发者

Table row deletion in Iphone

开发者 https://www.devze.com 2023-01-10 14:40 出处:网络
I have a with Table editing in iPhone. I\'m using Delegate a开发者_JAVA百科nd Datasource in my project.

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

精彩评论

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