UIScrollview calling superviews layoutSubviews when scrolling?

后端 未结 3 1795
走了就别回头了
走了就别回头了 2021-02-13 21:31

I added a UITableView as a subview to a custom UIView class I\'m working on. However I noticed that whenever I scroll the table it calls my classes layoutSubviews. I\'m pretty

3条回答
  •  孤街浪徒
    2021-02-13 22:10

    Not sure i understand your issue correctly but when you scroll a tableview it removes the cells not shown from the memory and loads them again when they are scrolled back into visibility (cells are allocated on demand, only the visible ones) , in effect doing what you seem to be describing.

提交回复
热议问题