| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
- (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];
}
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;
}
|