xib自定义cell遇到的一些问题解决办法

invalid nib registered for identifier(friendCell)- nib must contain exactly one top level object which must be a UITableViewCell instance

通过xib创建cell的时候如果cell中放的有与cell同级的控件。当运行程序的时候就会报这个错误。
 Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'invalid nib registered for identifier (friendCell) - nib must contain exactly one top level object which must be a UITableViewCell instance
解决办法就将与cell同级的多余的控件删除。保证xib中Cell的唯一性就可以了。



猜你喜欢

转载自blog.csdn.net/u010401245/article/details/52890488