开发者

How set accessory type when tabel view is enbled to editing?

开发者 https://www.devze.com 2022-12-29 15:15 出处:网络
I am using the UITableView properties to edit it. theTableView.editing = YES; theTableView.allowsSelectionDuringEditing = YES;

I am using the UITableView properties to edit it. theTableView.editing = YES; theTableView.allowsSelectionDuringEditing = YES;

It is working fine, the row is selected a开发者_高级运维nd I am getting into the next controller but I need to display the the accessoryType in the row. I am using below line for that but even though it is not working. Is there any property or any thing missing to display the indiactor.

cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;

I am using the below code for table view.

theTableView = [[UITableView alloc] initWithFrame:tableRect style:UITableViewStyleGrouped]; 
theTableView.editing = YES;
theTableView.allowsSelectionDuringEditing = YES;
theTableView.delegate = self;
theTableView.dataSource = self;
theTableView.scrollEnabled=YES;
theTableView.separatorColor = [UIColor lightGrayColor];
theTableView.autoresizingMask=YES;
theTableView.allowsSelection=YES;
theTableView.sectionHeaderHeight=5;
theTableView.sectionFooterHeight=5;

[myView addSubview:theTableView];

Please help me.

THank You, Madan Mohan


You can use the editingAccessoryType property of the UITableViewCell class.

0

精彩评论

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

关注公众号