nghialv / Hakuba

:cherry_blossom: Cellmodel-driven tableview manager
MIT License
474 stars 40 forks source link

MYSelectionHandler parameter can't cast UITableViewCell. #2

Closed dekatotoro closed 9 years ago

dekatotoro commented 9 years ago

Hi, Thanks for writing this great Library.

There is that one in trouble, It would help us if you would be compatible in the future.

MYSelectionHandler parameter is MYBaseViewProtocol. I want to use the view of cell in the handler, but MYBaseViewProtocol can't cast UIView. Is not possible to change the IF of MYSelectionHandler to MYBaseViewProtocol of class that inherits from UIView?

It is expected the correspondence. Thank you.

dekatotoro commented 9 years ago

Hi

I'm sorry. I can get cell in handler.

selectionHandler: { (cellView: MYBaseViewProtocol) in
    let cell = cellView as MYTableViewCell
} )

Thank you.

nghialv commented 9 years ago

:+1: