Is there a way to create UICollectionViewCell
without using existing cell identifier and existing nib file in cellForItemAtIndexPath
method?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
Its not necessary to use Storyboard/Xib for the CollectionViewCell. You can even create it programmatically. Subclass
UICollectionViewCell
and write up the code for the cell. Then in CollectionView controller class you have to register you custom cell class with the collectionViewYou can have different cell class if you are using different type cells. Reuse identifier should be unique.
In cellForItemAtIndexPath use the proper identifier to dequeue