0

Is there any way by which we could ask the UIView to compress the blank spaces in the screen, for example, I have the following elements

label1
label2
label3

I have built the view via IB.

At runtime, I hide 1 field, eg: label2.hidden = YES;
Now the view appears like this:

label1
space 
label3

Instead I would like:

label1
label3 - without the blank white space in the middle.

Thanks!

user542584
  • 2,651
  • 2
  • 25
  • 29

2 Answers2

0

For remove the space of Lable2, you can realloc frame for lable3 at runTime same the frame of lable2 than lable3 will be set on place of lable2.

Shilpa
  • 340
  • 1
  • 4
  • 14
0

Not a built in feature. You have to do it yourself.

hol
  • 8,255
  • 5
  • 33
  • 59