美文网首页
cell里的for循环重用问题

cell里的for循环重用问题

作者: a7cdfadad9f2 | 来源:发表于2017-12-07 14:21 被阅读0次

[self.mainview removeFromSuperview];

self.mainview = [[UIView alloc]init];

for (int i = 0; i  <  model.signalList.count; i++) {

这里是循环的控件

Airindex = [[AirindexView alloc]init]

[self.mainview addSubview:Airindex];

}

这样就不会重复叠加出现了


相关文章

网友评论

      本文标题:cell里的for循环重用问题

      本文链接:https://www.haomeiwen.com/subject/qivdixtx.html