Skip to content

Instantly share code, notes, and snippets.

@shnhrrsn
Created March 10, 2012 20:05
Show Gist options
  • Select an option

  • Save shnhrrsn/2012822 to your computer and use it in GitHub Desktop.

Select an option

Save shnhrrsn/2012822 to your computer and use it in GitHub Desktop.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"EGOTitledTableViewCell";
EGOTitledTableViewCell *cell = (EGOTitledTableViewCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[EGOTitledTableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
// Set up the cell...
if(indexPath.row == 0) {
cell.text = @"128m total, 13m free";
cell.title = @"memory";
} else if(indexPath.row == 1) {
cell.text = @"192.168.1.15";
cell.title = @"ip address";
} else {
cell.text = [UIDevice currentDevice].uniqueIdentifier;
cell.title = @"udid";
}
cell.accessoryType = UITableViewCellAccessoryNone;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment