Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple UIColectionViewCells #17

Open
benjaminhorner opened this issue Jul 27, 2016 · 3 comments
Open

Support for multiple UIColectionViewCells #17

benjaminhorner opened this issue Jul 27, 2016 · 3 comments

Comments

@benjaminhorner
Copy link

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
Copy link
Author

benjaminhorner commented Jul 27, 2016

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 benjaminhorner changed the title Support for multiple UIColectionViewCells and heights Support for multiple UIColectionViewCells Jul 28, 2016
@nmcdonaldd
Copy link

nmcdonaldd commented Nov 22, 2016

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.

@tiendaik
Copy link

tiendaik commented Nov 8, 2018

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants