Created
March 27, 2009 03:02
-
-
Save jarinudom/86508 to your computer and use it in GitHub Desktop.
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
// In cellForRowAtIndexPath | |
static NSString *CellIdentifier = @"MyCustomCell"; | |
MyCustomCell *cell = (MyCustomCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; | |
if (cell == nil) { | |
NSArray *topLevelObjects = [[NSBundle mainBundle] | |
loadNibNamed:@"MyCustomCell" | |
owner:nil options:nil]; | |
for (id currentObject in topLevelObjects) { | |
if ([currentObject isKindOfClass:[UITableViewCell class]]) { | |
cell = (MyCustomCell *) currentObject; | |
break; | |
} | |
} | |
} | |
cell.myLabel.text = @"Blah blah"; | |
return cell; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment