1

I have a view inside a collection view cell, and simply want the view to grow/shrink with the collection view cell. I add constraints that work perfectly if the collection view cell was just a UIView, but for some reason it does not work. I'm suspecting it might be a bug with collection view cells, anyone tried this before?

Here is a screenshot of the setup. Super simple, red view inside collection view cell, I just want it to resize the same way the collection view cell does.

enter image description here

2
  • What actually happens that you find improper? Commented Sep 11, 2014 at 0:45
  • I start dragging the corner of the cell, and the red box resizes in a really weird way, like half of if goes off in the top left direction. Commented Sep 11, 2014 at 0:50

1 Answer 1

1

I can reproduce your problem. I think it's a bug in Xcode. Go to http://bugreport.apple.com and open a ticket.

You can work around it by going to the “Resolve Auto Layout Issues” popup and choosing “Update Frames” under the “All Views in Collection View Cell” item:

collection view cell resize bug

Sign up to request clarification or add additional context in comments.

1 Comment

I have created a bug report and attached the animated gif you've created, thx for that.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.