Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show disclosure indicator while cells are in edit mode?

I have a UITableView that can be edited. I am displaying cells as such:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }

    // Configure the cell...
    STWatchList *mySTWatchList;
    mySTWatchList = [items objectAtIndex:indexPath.row];

    cell.textLabel.text = mySTWatchList.watchListName;

    return cell;
}

When the user is editing, I would like to show the disclosure indicator. How can I accomplish this?

like image 917
Sheehan Alam Avatar asked Jul 19 '10 17:07

Sheehan Alam


1 Answers

cell.editingAccessoryType = UITableViewCellAccessoryDisclosureIndicator;
like image 198
Vladimir Avatar answered Oct 15 '22 02:10

Vladimir