Вопрос

I would like to have buttons inside a scroll view (or another solution to creating a scrollable button bar).

I have buttons placed side by side in a row along the top of a view. As a user resizes the window to be less wide, fewer buttons can be seen.

When all the buttons cannot be viewed, I would like the user to still be able to access all the buttons by scrolling horizontally through them.

To visualise this, imagine in Safari if you open too many tabs to fit in the window - I would like the user to be able to scroll to the right and reveal the tabs that weren't on the screen.

Это было полезно?

Решение

You need to deselect the springs (for the custom view of the scroller) in the autosizing setter so that the view doesn't shrink along with the scroll view when you resize.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top