I am currently in process of making a registration form on my app in Swift 3 / xcode and I first have 3 text fields showing with a continue button underneath, I want it so the user presses the continue button and the current stackview slides out of view and a new one slides in (similar to a segue with the storyboards
This will show first and then they press continue:
Then this stack view will show:
Could somebody please point me in the right direction of how to do this?
Thank you.
For your case, I'm not pretty sure of what is the purpose of using a stackView. I suggest to use UICollectionView (horizontal) instead (UIStackView does not scroll which is inappropriate for what are you trying to achieve), especially that the two views should be the same cell in your case. All you have to do is to check what's the current
indexPath.row
for determining what cell's components should look/behave.Also, You can add target to the button to let the collectionView scrolls to the next cell if it's the first row, for the second row it should -for example- submit the form.
Hope it helped.