I Have a view in which a segment controller ,I have used with two selection.
So here I just want to increase the width of cell containing label with address on first selection rather decrease the width by second selection,and here I used one cell and also using autoresizing in it.
Views are attached in it.Please have a lookView on selection of second segment index 2
Views on selection of second segment index 1
I understand it as that you want the address to fill the space taken up by the price when there is no price to show, there I suggest to:
You can set a constraint for space between the address label and the price label. Then a constraint between the price label and the trailing margin. On scenarios where you do not need the price, set it's width to 0 and the address will stretch to fill up the space.
And since you are reusing the cell, remember to reset the width in
prepareForReuse of the cell.