Search code examples
iosxcodeautolayout

How to implement constraints for 1 image between 2 label for storyboard file


I had an imageView and 2 labels in the custom cell of the collection and how can I set the constraints for the images and labels. I need to center the 2 labels of the imageView at the same time I need to extend the label width at the run time. If the left side label had lengthy name I will just it to the center. Please help me.

See image


Solution

  • you probably need UIStackView with distribution set to Fill Equally

    StackView