我有一个方法告诉我该索引路径上的对象应该是什么类(基于包含字符串的数组)。通过先从方法获取类来设置类
然而,这引发错误
“未声明的标识符的使用 'instanceCell'
Class companyCellClass = [HomePageFlagIndexing tableCellClassForIndexPath:indexPath];
companyCellClass *instanceCell = [tableView dequeueReusableCellWithIdentifier:[HomePageFlagIndexing getIdentifierForIndexPath:indexPath]forIndexPath:indexPath];
有没有一种方法以编程方式这样设置类?
你寄存器单元或笔尖与标识? –
是的 - 它有 - 我只需要检查类,设置它,然后调用我的方法[instanceCell setUpWithType:0]; –