search

Home  >  Q&A  >  body text

objective-c - ios7 tableview不显示数据

自定义的cell,若把子控件加在self.contentview上,iOS7和iOS8都不显示数据;若直接加在self上,iOS8显示,iOS7不显示。是什么原因?有解没??

阿神阿神2889 days ago289

reply all(3)I'll reply

  • PHPz

    PHPz2017-04-17 17:45:20

    Solved! ! !

    iOS7 added on cell.contentView. ios8 is added to the cell;
    The problem of non-standard reuse of cells;

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 17:45:20

    Although the question you asked lacks useful information, I guess based on intuition, did you add the content to self instead of self.contentView when customizing the Cell?

    [self addSubview:][self.contentView addSubview:] There is still a little difference on iOS 7.

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 17:45:20

    Try using xib?

    reply
    0
  • Cancelreply