Muk*_*ore 4 iphone uitableview ios swift
let cell = tableView.dequeueReusableCellWithIdentifier("cellReuseIdentifier", forIndexPath: indexPath) as! CustomTableViewCell
Run Code Online (Sandbox Code Playgroud)
创建单元格后,我不想重复使用单元格,我希望它在内存中可用.
Max*_*ner 15
这当然是你的决定,但这是一个非常糟糕的主意.除非你的细胞少于10个,否则你tableView100%肯定不再有细胞.否则,应用程序将在内存压力下快速崩溃.
只是不要dequeue细胞.每次创建新:
let cell = UITableViewCell(style: UITableViewCellStyle.default, reuseIdentifier: "CellReuseIdentifier")
Run Code Online (Sandbox Code Playgroud)
不推荐,但毕竟这是你的决定.
| 归档时间: |
|
| 查看次数: |
12924 次 |
| 最近记录: |