Created
May 19, 2012 15:59
-
-
Save ninthspace/2731312 to your computer and use it in GitHub Desktop.
Choosing between XIBs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |
TaskItem *task = [fetchedResultsController objectAtIndexPath:indexPath]; | |
TaskItemCell *cell; | |
// check display settings | |
if ([[NSUserDefaults standardUserDefaults] boolForKey:[NSString stringWithFormat:@"%d", AlistoPrefKeyTypeShowTaskNumbers]]) { | |
cell = [tableView dequeueReusableCellWithIdentifier:@"TaskItemCellWithID"]; | |
} else { | |
cell = [tableView dequeueReusableCellWithIdentifier:@"TaskItemCell"]; | |
} | |
[cell setController:self]; | |
[cell setTableView:tableView]; | |
[cell setWithTaskItem:task]; | |
return cell; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment