'XCode IB: How to hide a button and make the next one in the grid take its space in (iOS)

I have a screen with 4 buttons and I need to hide some of them, for example, if I decide to hide button 3, then button 4 will occupy that blank space that button 3 left.

What I have:

1 2

3 4

What I want

1 3

4



Solution 1:[1]

I think it is better adding them on collection view , and hide and show item in list as you want

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Khaled Kamal