rearrange the UIButton position in a UIView iphone? -


i have set of uibuttons in class. according url fields uiwebview need rearrange position of buttons.

my button array is

 buttonarray = [[nsmutablearray alloc] initwithobjects:btn1,btn2,btn3,btn4,btn5,btn6, nil]; 

these buttons arranged in order, if mu url field gives value false means need remove button btn1 , other buttons should retain display order.

i tried code

if(false) { btn1.hidden=yes; btn2.center=cgpointmake(btn1.frame.origin.x, btn1.frame.origin.y); } 

but btn2 not take position of btn1.

how arrange buttons such other buttons should retain display order when of buttons missing in display.

hope help.

not @ accessible computer guess...try:

cgrect buttonframe = btn1.frame; [btn2 setframe: buttonframe]; 

Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

c++ - Accessing inactive union member and undefined behavior? -

php - Get uncommon values from two or more arrays -