3lvis / Form

The most flexible and powerful way to build a form on iOS
http://hyper.no
Other
1.64k stars 145 forks source link

How does one subscribe a custom cell's FORMBaseFieldDelegate to the conforming class FORMDataSource? #573

Open jasper-chan opened 7 years ago

jasper-chan commented 7 years ago

Hello,

Recently we've been creating our own custom cell classes. I subclassed them off of the FORMBaseFieldCell class and I would like to make use of the delegate in there. What is the recommended way for someone to set the delegate found in FORMBaseFieldCell to the conforming class FORMDataSource without directly modifying the source code?

EDIT: So far, in the block configureCellForItemAtIndexPathBlock, I cast the collectionView.dataSource object as an id. Is this the best way to do this?

3lvis commented 7 years ago

Hi @jasper-chan,

The process of adding custom cells is not optimal at the moment, currently, there's no way to make a custom cell behave like a normal embedded cell, a custom cell just has to handle everything on its own.

If you have any suggestions on how we could improve this let us know.