cocoaTouch/GravesViewController.m
changeset 3513 f589230fa21b
parent 3490 016b3172b645
equal deleted inserted replaced
3512:6a8b5f313190 3513:f589230fa21b
    46     return [self.graveArray count];
    46     return [self.graveArray count];
    47 }
    47 }
    48 
    48 
    49 // Customize the appearance of table view cells.
    49 // Customize the appearance of table view cells.
    50 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    50 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    51     
       
    52     static NSString *CellIdentifier = @"Cell";
    51     static NSString *CellIdentifier = @"Cell";
    53     
    52     
    54     UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    53     UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    55     if (cell == nil)
    54     if (cell == nil)
    56         cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    55         cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    57     
    56     
    58     NSString *grave = [graveArray objectAtIndex:[indexPath row]];
    57     NSString *grave = [self.graveArray objectAtIndex:[indexPath row]];
    59     cell.textLabel.text = [grave stringByDeletingPathExtension];
    58     cell.textLabel.text = [grave stringByDeletingPathExtension];
    60     
    59     
    61     if ([grave isEqualToString:[teamDictionary objectForKey:@"grave"]]) {
    60     if ([grave isEqualToString:[self.teamDictionary objectForKey:@"grave"]]) {
    62         cell.accessoryType = UITableViewCellAccessoryCheckmark;
    61         cell.accessoryType = UITableViewCellAccessoryCheckmark;
    63         self.lastIndexPath = indexPath;
    62         self.lastIndexPath = indexPath;
    64     } else {
    63     } else {
    65         cell.accessoryType = UITableViewCellAccessoryNone;
    64         cell.accessoryType = UITableViewCellAccessoryNone;
    66     }
    65     }