如何在单元格处于编辑模式时显示披露指示符?

She*_*lam 20 iphone cocoa-touch objective-c uitableview

我有一个可以编辑的UITableView.我正在显示单元格:

- (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;
}
Run Code Online (Sandbox Code Playgroud)

当用户正在编辑时,我想显示披露指标.我怎么能做到这一点?

Vla*_*mir 55

cell.editingAccessoryType = UITableViewCellAccessoryDisclosureIndicator;
Run Code Online (Sandbox Code Playgroud)