문제

I am hiding the second button below, but I want the top button to drop down. Is there a way to do that where it has a relative layout.

enter image description here

도움이 되었습니까?

해결책

Yes you can do this. One of my project I had to do this. If you are using autolayout then you can not manually change your buttons frames. You can either have to disable autolayout, or modify the constraints programmatically. I followed the first one.

In your case, if you want the first button to take the position of the second one (which you are hiding) then take the frame of the second button and assign it to the first button.

Hope this helps. :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top