non-forIndexPath: version returns nil in that case.
forIndexPath: version asserts (crashes) if you didn't register a class or nib for the identifier.
forIndexPath: must register a class or nib file using the registerNib:forCellReuseIdentifier: or registerClass:forCellReuseIdentifier: method before calling this method.
也就是cell是存在的。当无cell 时是不可以用的
本文详细解析了UITableView在Swift中使用过程中遇到的cell加载问题,包括如何正确注册cell类或nib文件,以及未注册时可能引发的应用崩溃等问题。
2109

被折叠的 条评论
为什么被折叠?



