Is it possible to use IBDesignable with UICollectionViewCells and live to make them in a storyboard?

I know how to use @IBDesignable with custom views. but is it possible to use IBDesignable for cells and display them in a storyboard?

for example: I have a collectionViewController in the storyboard and added uiCollectionCell and the specified class as my customCellClass.

ps: I know that to use Xibs in collectcionViews and tableViews we have to call the registerNib: forReuseIdentifer method in the code (and I do it). just wondering if this can be seen as a storyboard or not.

p.s2: I found this one and works great with UIViews, but don’t know how to get it to work with CollectionCells and TableCells ,: (

+5
source share
1 answer

After many tests and working with the library, I came up with the following:

you should not add TableViewCell or CollectionViewCells files inside .nib , instead you need to add a simple view. I'm not sure if it will appear inside the storyboard or not (not yet verified), but this makes the errors go away. Now you can use autoLayout to calibrate cells yourself.

-1
source

Source: https://habr.com/ru/post/1240229/


All Articles