转载自:http://2009315319.blog.51cto.com/701759/1132754
2013-02-07 09:16:16
原创作品,允许转载,转载时请务必以超链接形式标明文章
原始出处 、作者信息和本声明。否则将追究法律责任。
http://2009315319.blog.51cto.com/701759/1132754
- int main(int argc, char *argv[])
- {
- @autoreleasepool {
- return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
- }
- }
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- static NSString *CellIdentifier = @”CellIdentifier”;
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
- if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
- }
- NSUInteger row = [indexPath row];
- NSDictionary *rowDict = [self.listTeams objectAtIndex:row];
- cell.textLabel.text = [rowDict objectForKey:@"name"];
- NSString *imagePath = [rowDict objectForKey:@"image"];
- imagePath = [imagePath stringByAppendingString:@".png"];
- cell.imageView.image = [UIImage imageNamed:imagePath];
- cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
- return cell;
- }