2
A
回答
1
为了做你的图像中所解释的位置,你可以写你的BUTTON2行动方法如
-(IBAction)btn2Action:(UIButton *)sender
{
button2.hidden = TRUE;
// Change y value (if you have all three buttons in vertical) of button 3 Frame Like:
CGRect btn3Frame = button3.frame;
btn3Frame.origin.y = button2.frame.origin.y;
button3.frame = btn3Frame;
// Change x value (if you have all three buttons in Horizontal) of button 3 Frame Like:
CGRect button3Frame = button3.frame;
button3Frame.origin.x = button2.frame.origin.x;
button3.frame = button3Frame;
}
+0
谢谢@Er.Vihar的工作 – Sasi
简单地使用此button.is隐藏=是隐藏按钮。 –
button.isHidden = YES只隐藏按钮但不删除按钮占用的空间 – Sasi
@sasikumar,你问android的问题吗? – aircraft