Fscalendar: How do I register custom cell for reuse?

Created on 3 Oct 2017  ·  4Comments  ·  Source: WenchaoD/FSCalendar

I do it like this:

newCalendarView.register(MonthPlanCollectionViewCell2.classForCoder(), forCellReuseIdentifier: "a")

but it doesnt work.

This is my xib file:

screen shot 2017-10-03 at 17 19 54

Most helpful comment

i had the same problem. Solved it using this:

```
calendar.collectionView.register(UINib(nibName: "MyCell", bundle: nil), forCellWithReuseIdentifier: "cell")

All 4 comments

Hi, any way to load custom cell from nib?

@kunass2 @kushal211 Hey! Did you have any luck with custom cells? thnx

Did anybody figure this out?

I’m registering mine like this:

calendar.register(MyCustomCell.self, forCellReuseIdentiier: “Cell”)

And it loads, but the subviews on the cell (UILabels) are always nil

@kunass2 @tinaStremenova @kushal211

i had the same problem. Solved it using this:

```
calendar.collectionView.register(UINib(nibName: "MyCell", bundle: nil), forCellWithReuseIdentifier: "cell")

Was this page helpful?
0 / 5 - 0 ratings