Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法自动分配一个集合视图单元的标识符?我有几百个单元格都给了我“单元格必须具有重用标识符”警告,我不想手动分配它们...
Yeah, as long as all of your cells are the same class, you should be able to do something like this before setting them up:
[self.collectionView registerClass:[Cell class] forCellWithReuseIdentifier:@"MyCell"];