XLActionController icon indicating copy to clipboard operation
XLActionController copied to clipboard

Support for multiple UIColectionViewCells

Open benjaminhorner opened this issue 8 years ago • 3 comments

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?

benjaminhorner avatar Jul 27 '16 13:07 benjaminhorner

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.

benjaminhorner avatar Jul 27 '16 16:07 benjaminhorner

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.

nmcdonaldd avatar Nov 22 '16 00:11 nmcdonaldd

Any update on this?

tiendaik avatar Nov 08 '18 02:11 tiendaik