坑:滑動tableView,cell會添加到復用的cell上
就像這樣子
報錯是這樣子的
初步判斷躯泰,是cell的復用有問題谋减,看了看,有這么個方法
- (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的復用問題再悼,在復用的cell重復創(chuàng)建cell再賦值核畴,取得復用cell后判斷一下就好了。