How to programmatically add constraints from label to UICollectionViewCell?

I have a question regarding constraints to a UICollectionViewCell.


An image is included to help visualize what I mean.


I have a UICollectionViewController. Inside this controller I have added a UICollectionViewCell, which only takes up a part of the screen.


My question is: How do I add constraints from a label (see image) to that UICollectionViewCell, such that I know that the label is always the same distance from the UICollectionViewCell. In the image the distance is shown as an arrow (this is the constraint, that I want to add).



Thanks in advance.

Replies

We cannot see images on the forum. Unless you post a link to an image.