Skip to content
This repository has been archived by the owner on Aug 1, 2019. It is now read-only.

Collection view with custom views not working #198

Open
ahmadabudawod opened this issue Apr 1, 2018 · 2 comments
Open

Collection view with custom views not working #198

ahmadabudawod opened this issue Apr 1, 2018 · 2 comments

Comments

@ahmadabudawod
Copy link

ahmadabudawod commented Apr 1, 2018

I was tried to send collection view with the custom cell but unfortunate show me only empty space.
`
let label = UILabel.init(frame: CGRect(x:0, y: 0, width:200, height:200))
label.text = "Test1"
label.backgroundColor = .red

                            let label1 = UILabel.init(frame: CGRect(x:0, y: 0, width:200, height:200))
                            label1.text = "Test 2"
                            label1.backgroundColor = .red
                            let selectedImages = [label1,label1]
                            let imageSize =
                                CGSize(
                                    width: 200,
                                    height: 200)
                            let views: [UILabel] =
                                selectedImages.map
                                    {
                                        image -> UILabel in
                                        let label = UILabel.init()
                                        label.sizeToFit()
                                        label.text = "asdfasdfasdfasdfasdf"
                                        label.backgroundColor = .red
                                        label.textColor = .red
                                        label.frame.size = CGSize(
                                            width: 50,
                                            height: 50)
                                        return label
                            }
                            _ = super.sendCollectionViewWithViews(views, numberOfRows: 2.0, isIncomingMessage: true)`

screen shot 2018-04-01 at 4 43 14 pm

@ahmadabudawod
Copy link
Author

Any update ?

@mdflores
Copy link

Any Updates on this?

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

No branches or pull requests

2 participants