I have anUICollectionView
inside aUITableViewCell
and I have some issues regarding to Auto layout.
That's the hierarchy of my views.
UITableViewCell
|
-------ContentView
|
-------MyView
|
|-----UICollectionViewCell
Until here, all views are pinned up in his superviews., e.g: trailing space=0, leading space=0, top space=0, bottom space 0.
The height of myUICollectionViewCell
is dynamic, based on the number of itens, which I draw usingUICollectionViewLayout
. So it has a height constraint which is >= 100.
After the Items are in place, I call one delegate to update that height constraint, so myUITableView
is able to calculate the right height for theUITableViewCell
.
Even though this are working fine, sometimes I get the auto layout error above.
How can I avoid this?