UITableCellViewController *cell; static NSString *tableCellIdentifier = @"TableCellIdentifier"; cell = (UITableCellViewController *)[tableView dequeueReusableCellWithIdentifier:tableCellIdentifier]; if( cell == nil ) { //cell = [[[UITableCellViewController alloc] initWithStyle:UITableViewCellStyleDefault // reuseIdentifier: SimpleTableIdentifier] autorelease]; NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"UITableCellViewController" owner:self options:nil] ; //cell = [nib objectAtIndex:0]; for(id oneObject in nib){ if([oneObject isKindOfClass:[UITableCellViewController class]]){ cell = (UITableCellViewController *)oneObject; } } } cell.myText.text = @"world"; return cell;
ios 用xib自定义uitableviewcell
猜你喜欢
转载自longquan.iteye.com/blog/1671705
今日推荐
周排行