Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

Commit

Permalink
Fixed incorrect automatic refactoring
Browse files Browse the repository at this point in the history
For some reason Xcode used YXCustomizableCell instead of YXAbstractCell
  • Loading branch information
rbsgn committed Jul 19, 2010
1 parent 553e1e2 commit 520caf9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Classes/YXModelTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ - (void)setSections:(NSArray*)sections {
_sections = [sections retain];
}

- (YXCustomizableCell*)modelCellAtIndexPath:(NSIndexPath*)indexPath {
- (YXAbstractCell *)modelCellAtIndexPath:(NSIndexPath *)indexPath {
YXSection * section = [_sections objectAtIndex:indexPath.section];
YXCustomizableCell * cell = [section.cells objectAtIndex:indexPath.row];
YXAbstractCell * cell = [section.cells objectAtIndex:indexPath.row];
return cell;
}

Expand All @@ -61,17 +61,19 @@ - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInte
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
YXCustomizableCell * cell = [self modelCellAtIndexPath:indexPath];
YXAbstractCell * cell = [self modelCellAtIndexPath:indexPath];
UITableViewCell * reusableCell = [tableView dequeueReusableCellWithIdentifier:cell.reuseIdentifier];
UITableViewCell * newCell = [cell tableViewCellWithReusableCell:reusableCell];

if (reusableCell != nil && newCell != reusableCell) {
NSLog(@"WARNING: reusable cell for id %@ was ignored", cell.reuseIdentifier);
}

return newCell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
YXCustomizableCell * cell = [self modelCellAtIndexPath:indexPath];
YXAbstractCell * cell = [self modelCellAtIndexPath:indexPath];
[cell tableView:tableView didSelectRowAtIndexPath:indexPath];
}

Expand All @@ -81,7 +83,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
//}

- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
YXCustomizableCell * cell = [self modelCellAtIndexPath:indexPath];
YXAbstractCell * cell = [self modelCellAtIndexPath:indexPath];
[cell tableView:tableView accessoryButtonTappedForRowWithIndexPath:indexPath];
}

Expand Down

0 comments on commit 520caf9

Please sign in to comment.