坑:滑動tableView,cell會添加到復(fù)用的cell上

就像這樣子

報錯是這樣子的
初步判斷,是cell的復(fù)用有問題,看了看,有這么個方法
- (void)prepareForReuse; ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?// if the cell is reusable (has a reuse identifier), this is called just before the cell is returned from the table view method dequeueReusableCellWithIdentifier:. ?If you override, you MUST call super.
在方法中把子視圖移除,這方法不好。因為在view中創(chuàng)建了cell,其就不能是空

這是現(xiàn)在的
填坑方法:就是cell的復(fù)用問題,在復(fù)用的cell重復(fù)創(chuàng)建cell再賦值,取得復(fù)用cell后判斷一下就好了。