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

How to give UICollectionView auto height with Masonry? #416

Open
burakkilic opened this issue Jan 20, 2017 · 0 comments
Open

How to give UICollectionView auto height with Masonry? #416

burakkilic opened this issue Jan 20, 2017 · 0 comments

Comments

@burakkilic
Copy link

New Issue Checklist

🚫 If this template is not filled out your issue will be closed with no comment. 🚫

  • [ *] I have looked at the Documentation
  • [ *] I have filled out this issue template.

Issue Info

Info Value
Platform ios
Platform Version ios 9.35
Masonry Version 1.0
Integration Method cocoapods

Issue Description

Hi;

I have following code for my UICollectionView:

 //////////////////////// Item Recommendations Collection View in Second Container
[self.itemRecommendationsCollectionView remakeConstraints:^(MASConstraintMaker *make) {
    make.height.equalTo(@750);
 
    make.left.equalTo(self.itemRecommendationsContainerView.left).with.offset(@45);
    make.right.equalTo(self.itemRecommendationsContainerView.right).with.offset(@-45);
    make.bottom.equalTo(self.itemRecommendationsContainerView.bottom).with.offset(@-150);
    make.top.equalTo(self.itemRecommendationsTitleLabel.bottom);
}];

It is working fine. But I don't want to give constant height to my collection view.

If I change 750 to something else, it doesnt work. Height become 0.

What should I do for that?

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