Deactivate horizontal scroll indicator in MobileScrollArear

Hi @Jeremie_L , I was trying to deactivate the horizontal scroll indicator in a MobileScrollArea with a declare, but I couldn’t work it out.

As a basis I had used your code from the SetScrollToTopXC function and modified it with this but the app crashes.
https://developer.apple.com/documentation/uikit/uiscrollview/1619380-showshorizontalscrollindicator

Would you be able to help, please? Is this even the right function? Thank you!

Hi Christoph,

No it isn’t the correct function because it will hide the scroll indicator but not prevent scrolling.

I think the only way to prevent scrolling in a particular direction is to make sure the Mobilescrollablearea.Container width or height is smaller than the Mobilescrollablearea width / height respectively.

That’s exactly what I’d like to do: enable scrolling but not showing the indicator. I’m trying to replicate a menu like this:

You can use SetHorizontalScrollbarVisibleXC
Or
SetVerticalScrollbarVisibleXC

From iOSdesignExtensions :wink:

Sorry, I did not find it because I wasn’t using your latest releases. I now do and - as always - it works perfectly. Thank you!

1 Like

You’re welcome :wink:

If you have ARCollectionView from Antonio Rinaldi, it might be even better than using your own implementation of a scrollable tab bar.

I am going to use ARCOLLECTIONVIEW for that purpose in my next app

I didn’t know ARCollectionView had this. I just finished doing it and it serves my purpose. I’ll have a closer look at ARCollectionView before I will be doing something like this again… :upside_down_face: