Home > OS >  iOS: How to create a scrollable UIStackView?
iOS: How to create a scrollable UIStackView?

Time:07-07

I am trying to recreate this

How can i create something like this? I believe the labels should be buttons because i would like to click on them and then they would take me to another UIViewController.

But how can i make a stackView scrollable or this is not even a stackView?

CodePudding user response:

Did you tried to adopt UICollectionView insted of StackView?

I think it could support this approach better than StackViews

CodePudding user response:

stackView doesn't scroll, You need to make either a horizontal scroll view with stackview in it Or The best approach is to use UICollectionView for this. You will then write code for navigation in didSelectItemAt method of UICollectionViewDelegate.

  • Related