ios 用xib自定义uitableviewcell
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; 相关推荐
Terminator0 2020-02-19
WintonTalks 2012-07-16
莫封洛 2019-07-26
我的iOS王者之路 2019-06-28
MoMo 2017-01-10
Rephontil 2015-08-10
MinggeQingchun 2015-07-13
NineYao 2015-01-30
liuwentao 2013-09-13
wsmrcool 2013-01-17
SoccerZZM 2012-10-15
NineYao 2012-07-16
heqiang0 2020-06-25
wenxuegeng 2020-06-10
tenvainvi 2020-06-09