0

How to give constraint to below view

design img

Here how to give constraints to blue doted imageView.

for label giving

 top = 10, leading = 20, trailing = 20

so if text change label height also changing... but the doted image stick on the same place

because for blue doted image

width = height = 15, leading, top to above doted image = 20

When text change in label.. Label is expending but the doted image not coming with its label.

How to give constraints to small doted image.. if the above label increases its height then doted image also come down similar to its right label, Please suggest me constraints.

Parth Patel
  • 915
  • 11
  • 33
Swift
  • 1,074
  • 12
  • 46

2 Answers2

0

You can give constraints as follows:

Image Constraints

  • leading 10
  • Trailing w.r.t label 10
  • vertically center w.r.t label
  • height and width 20

enter image description here

Label Constraints

  • Top 100 (modify the value as per your design)
  • trailing 10

enter image description here

Final Output:

enter image description here

This will resolve your issue.

Ritu pal
  • 306
  • 2
  • 11
0

For that you must have to give 1st lable's bottom constraint with 2nd dotted image view (I mean vertical spacing between 1st lable and 2nd dotted image view)

vertical spacing between 1st lable and 2nd dotted image view

Final result

Final result

New image with 1st label constaint

iOS_Dev
  • 66
  • 5