I have 4 buttons in a viewController in XCode. I already added code to the buttons. I want to have the buttons side by side in the view where there is only one button on the screen at a time and the edge of the other buttons on the edge of the screen. I wanted to know how would I be able to accomplish this? I would prefer not to delete the buttons I have in the view already if possible, and use them in the horizontal view. If you need more information than this just let me know?
Horizontal Scroll View
Can you put all buttons at the same position, hide all (isHidden = true) then unhide the one that need to be visible.
When you change button, repeat it : hide all four and unhide the one you need.
It may be convenient to create an Outlet collection (array) for the four buttons, to loop throughout the 4 buttons.