在ios4.3时下列用法是可行的:

NSArray *nibfile = [[NSbound mainBundle] loadNibNames:@dcell" owner:self option:nil];

CGRect cellFrame = CGRectMake(0,0,300,30);

cell = [[UITableViewCell  alloc] initWithFrame:cellFrame reuseIdentifier:CellIdentifer] autorelease];

但是在iOS5.0之后initWithFrame方法的这一形态用法被停用了,据官方文档说,现在改用initWithStyle。具体如何使用呢?

cell = [[[UITableViewCell  alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];

以备参考!!

相关文章:

  • 2021-12-23
  • 2021-10-08
  • 2021-12-04
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案