2010/01/05

編集時のアクセサリ設定。

  1. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {  
  2.       
  3.  static NSString *SetCellIdentifier = @"SetCellIdentifier";  
  4.    
  5.  UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SetCellIdentifier];  
  6.    
  7.  if (cell  == nil) {  
  8.   cell = [[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:SetCellIdentifier];  
  9. //ここでアクセサリと編集時のアクセサリを設定する。  
  10.   cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;  
  11.   cell.editingAccessoryType = UITableViewCellAccessoryDisclosureIndicator;  
  12.  }  
  13.    
  14.  cell.textLabel.text =[[setListArray objectAtIndex:indexPath.row] valueForKey: @"set_title"];  
  15.  return cell;  
  16. }