How do I set the type of an accessory when table view is editable?

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

It works fine, the row is selected and I get to the next controller, but I need to display the type of accessory in the row. I use the line below for this, but even if it doesn't work. Is there any property or any thing missing for the display of the indiactor.

cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;

I am using the below code to view a table.

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.

Throw you away, Madan Mohan

+2


a source to share


1 answer


You can use the editingAccessoryType property of the UITableViewCell class.



+7


a source







All Articles