【发布时间】:2015-03-09 06:36:51
【问题描述】:
我正在使用标签库XLPagerTabStrip
如果我不添加此行:[self.tableView registerClass:[UserInfoBasicCell class] forCellReuseIdentifier:kCellIdentifierBasicCell];
它在 cellForRowAtIndexPath 处崩溃:[tableView dequeueReusableCellWithIdentifier:kCellIdentifierBasicCell forIndexPath:indexPath];
如果我添加该行,我将看不到单元格。单元格不是通过程序创建的,它是在情节提要中创建的。
库有一个bug:http://github.com/xmartlabs/XLPagerTabStrip/issues/10
如何让单元格显示? 或者标签库XLPagerTabStrip有什么好的替代品吗?
【问题讨论】:
-
我也试过了,但是不行。
-
你在哪里添加了那个方法?在 viewDidLoad 或 cellForRowAtIndexPath: 中?试试Set reuse identifiers in storyboard 而不是 registerNib ?
-
情节提要中的表格、我设置的单元格和类集是如何定义的?
-
确保 kCellIdentifierBasicCell 的值与您在情节提要中为单元重用标识符提供的值相同。
标签: ios objective-c uitableview