I'm trying to replicate an app design I saw on Dribbble (just for learning) and I have a question about dynamically changing a view's constraint. I have a collectionView, which might now contain cells at all.
Below that collectionView I have a view (UILabel), I want to change the UILabel topAnchor constraint, so if I have only one cell in the collectionView the UILabel will be displayed higher on screen. How can I do that? I have my View and ViewController separated, so when I set the constraints on the View file, there are no cells at all.
for example, In this state, I want the "To do list" label to be closer to the one cell I have: