eBay/NMessenger

Collection view with custom views not working

ahmadabudawod opened this issue · 2 comments

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

Any update ?

Any Updates on this?