Re: UICollectionViewCell and UIScrollView and autolayout
Re: UICollectionViewCell and UIScrollView and autolayout
- Subject: Re: UICollectionViewCell and UIScrollView and autolayout
- From: Kyle Sluder <email@hidden>
- Date: Mon, 26 May 2014 12:32:08 -0400
> On May 26, 2014, at 12:10 PM, Luke Hiesterman <email@hidden> wrote:
>
> That is fine, but the statement made in your original email said “autolayout has assigned a frame to the cell.” You’re free to use autolayout inside the content view - just don’t try to layout the cell itself.
In practice, this restriction is extremely difficult to obey, because constraints are not directional. If you want a subview to be _affected by_ the collection view cell’s frame, it must necessarily also have the potential to affect the collection view cell’s frame. You can’t just prohibit lines drawn from subviews to the superview; instead you have to ensure those are dominated at all times by the autoresizing-mask constraints installed by the collection view layout.
The most difficult time to uphold this restriction is usually during view setup when you’re installing constraints manually but the autoresizing mask constraints haven’t yet been generated.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden