0

I am making an app where I need text to display directly above a UIImage. When the text is too wide to fit, I need it to display on 2 rows of text, with the bottom one being at the same position vertically as if it only had one row. If the text cannot fit in two rows, I want it to get smaller so that it will just fit in the two rows. Below is an image showing what I mean.

Image

Bob Samuels
  • 53
  • 10

1 Answers1

0

Label constraints : top to superview , leading & trailing & bottom to imageView ,,, with .lines = 2 , textAlignment = .center

ImageView constraints : centerX , width , height

Shehata Gamal
  • 98,760
  • 8
  • 65
  • 87