iOS: What is a difference between dequeueReusableCell(withIdentifier:for:) and dequeueReusableCell(withIdentifier:)?

后端 未结 4 451
故里飘歌
故里飘歌 2021-01-13 18:23

According to the official documentation, there are two ways to get a reusable cell from a queue of a tableView. One is dequeueReusableCell(withIdentifier:for:)

4条回答
  •  孤街浪徒
    2021-01-13 18:53

    dequeueReusableCell(withIdentifier:) AND dequeueReusableCell(withIdentifier:for:)

    Both returning the cell, but older method return nil while latest method crashes the app.

    older may support upto iOS 5 while newer method support iOS 6 and Above

提交回复
热议问题