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

Can I add a CollectionView? #99

Open
sergiotrejo016 opened this issue Nov 30, 2017 · 0 comments
Open

Can I add a CollectionView? #99

sergiotrejo016 opened this issue Nov 30, 2017 · 0 comments

Comments

@sergiotrejo016
Copy link

I'm trying to add a collection view this way but cells are not being displayed. Cell is created through storyboard nib, all a get is constraints warnings in console.

` let collectionView : UICollectionView = {
let layout = UICollectionViewFlowLayout()
let cv = UICollectionView(frame: .zero, collectionViewLayout: layout)

        cv.delegate = self
        cv.dataSource = self
        return cv
    }()

    
    let nib = UINib(nibName: "CategoriesCollectionViewCell", bundle: nil)
    collectionView.register(nib, forCellWithReuseIdentifier: "CategoriesCell")

// collectionView.register(CategoriesCollectionViewCell.self, forCellWithReuseIdentifier: "CategoriesCell")

    let cvFrame = CGRect(x: 0, y: 0, width: self.view.frame.width - 60, height: self.view.frame.height  - 100)
    collectionView.frame = cvFrame
    
    
    let startPoint = CGPoint(x: self.view.frame.width - 60, y: 55)
    self.popover = Popover()
    popover.show(collectionView, point: startPoint)`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant