PaperCollectionView icon indicating copy to clipboard operation
PaperCollectionView copied to clipboard

Issue with instantiation

Open aliasdoc opened this issue 9 years ago • 0 comments

Hi,

When I try to instantiate, nothing appears...

paperView = PaperView(frame:CGRectZero)
        paperView.translatesAutoresizingMaskIntoConstraints = false
        paperView.delegate = self
        paperView.datasource = self
        paperView.parentViewController = self
        paperView.collectionViewController.collectionView?.registerClass(CustomPaperCell.self, forCellWithReuseIdentifier: kReuseID)
        paperView.addShadow()
        self.view.addSubview(paperView)

        NSLayoutConstraint.init(item:paperView.superview!,
                                attribute:.Trailing,
                                relatedBy:.Equal,
                                toItem:paperView,
                                attribute:.Trailing,
                                multiplier:1.0,
                                constant:0.0).active = true
        NSLayoutConstraint.init(item:paperView,
                                attribute:.Leading,
                                relatedBy:.Equal,
                                toItem:paperView.superview,
                                attribute:.Leading,
                                multiplier:1.0,
                                constant:0.0).active = true
        NSLayoutConstraint.init(item:paperView,
                                attribute:.Height,
                                relatedBy:.Equal,
                                toItem:nil,
                                attribute:.NotAnAttribute,
                                multiplier:1.0,
                                constant:300.0).active = true
        NSLayoutConstraint.init(item:self.bottomLayoutGuide,
                                attribute:.Top,
                                relatedBy:.Equal,
                                toItem:paperView,
                                attribute:.Bottom,
                                multiplier:1.0,
                                constant:0.0).active = true
        paperView.collectionViewController.collectionView?.reloadData()

Any idea ?? it appears that cellForItemAtIndexPath() is not called after numberOfSectionsInCollectionView() and numberOfItemsInSection()

Thanks

aliasdoc avatar Aug 17 '16 17:08 aliasdoc