Skip to content

Issue with instantiation #3

@aliasdoc

Description

@aliasdoc

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions