XLActionController
XLActionController copied to clipboard
Support for multiple UIColectionViewCells
Not really an issue, more like a suggestion for improvement. I have been struggling with trying to figure out how to use multiple UIColectionViewCells classes on a single action sheet.
For example, if I wanted a specific view at index N, with a height different from the other cells. Maybe a Decoration View would be more appopriate?
I found a dirty workaround using
cellSpec = CellSpec.NibFile(nibName: "ShareCell", bundle: NSBundle(forClass: ShareCell.self), height: { (actionData) -> CGFloat in
if actionData.subtitle != nil {
return 100
}
return 200
})
However, i would be great to be able to use 2 different Cells and get the action style as a parameter (eg action.style == .Destructive), so as to have a dynamic way to determine the cell type.
I have two different nibs that I would like to use in a single action sheet. Any way to get this to work? One of the cells has a textField in it and one has a label in it. Is there any way to use two different cells? I see your way for changing heights but what about different cells in the same action sheet?
Edit: Going to use the Spotify example as a "template" so to speak. Going to use a header view for implementing a separate style of a cell.
Any update on this?