Question

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

Was it helpful?

Solution

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. :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top