UITableViewCell - overlapping with previous cells contents

后端 未结 5 1455
名媛妹妹
名媛妹妹 2021-02-08 15:22

I have this wierd problem with my table

  1. i Have about 20 cells to display
  2. Each cell is about 84px in height
  3. When i click no the cell, i have set a
5条回答
  •  终归单人心
    2021-02-08 15:37

    I figured it out with some trial and error; if this can help some one

    In cellforRowAtIndexPath i tried to clear all the cells subview before drawing the cell

    //TRY TO REMOVE ALL CONTENT
        for(UIView *view in cell.contentView.subviews){
            if ([view isKindOfClass:[UIView class]]) {
                [view removeFromSuperview];
            }
        }
    

    I would be happy if someone can point me to some easier way

    Thanks

提交回复
热议问题