2010-07-19 15 views
19

Düzenlenebilir bir UITableView var. Ben gibi hücrelerini gösteren ediyorum:Hücreler düzenleme modundayken bildirim göstergesi nasıl gösterilir?

kullanıcı düzenliyor
- (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; 
} 

, ben açıklama göstergesini göstermek istiyorum. Bunu nasıl başarabilirim?

cevap

54
cell.editingAccessoryType = UITableViewCellAccessoryDisclosureIndicator; 
0
if (indexPath.row==0) 
    { 
     cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease]; 
     cell.selectionStyle = UITableViewCellSelectionStyleGray; 
     cell.editingAccessoryType = UITableViewCellAccessoryDisclosureIndicator; 
    } 

    else 
    { 
     cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; 
     cell.selectionStyle = UITableViewCellSelectionStyleNone; 
    } 
İlgili konular