TransWikia.com

TVOS: How to achieve a scrolling effect between between different view elements?

Stack Overflow Asked by Ahmed Ghrib on January 26, 2021

WHAT I AM TRYING TO ACHIEVE:
Something similar to the scrolling between these "movie-cards" in the Amazon app:

EXPECTED BEHAVIOR:.
User can scroll between the movies.
If he reaches the limit, then new movies will appear in the view on the right. (Not necessarily completely)
And movies on the left will disappear. (Not necessarily completely)

WHAT I HAVE DONE SO FAR:
I have followed this tutorial.

  1. I created a scrollview.
  2. I embedded inside of it a horizontal stack view.
  3. I added a bunch of buttons inside the horizontal view. (Instead of movie cards for the sake of simplicity).

enter image description here.

THIS IS THE RESULT:.
enter image description here

enter image description here
So basically, I can only see one button and a small part of the second button. That’s it.
I have seen a lot of tutorials but none of them seems to explain how to achieve the effect I’m looking for. So even if you don’t have an answer, any tip regarding what I should look for is welcome.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP