This file contains 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
// replace annoying boilerplate with declarative justice using FunctionalKit: | |
UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier]; | |
if (cell == nil) { | |
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; | |
} | |
// => | |
// nota bene: category on UITableView for convenient factory method is highly recommended. | |
id maybeCell = [[aTableView maybe] dequeueReusableCellWithIdentifier:CellIdentifier]; |