Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I hide/remove ScrollBar in ScrollView in SwiftUI?

Tags:

swiftui

If the content of the ScrollView is bigger than the screen, while scrolling, the scrollbar on the side appears. I couldn't find anything to help me hide it.

like image 932
Hamoonist Avatar asked Sep 12 '19 10:09

Hamoonist


People also ask

How do I hide vertical scrollbar but still scrollable?

How to Hide the Vertical Scrollbar in CSS. To hide the vertical scrollbar and prevent vertical scrolling, use overflow-y: hidden like so: HTML.

How do I hide the scrollbar in ion content?

Because of Ionic use shadow DOM for ion-content, should disable scroll in element on shadow DOM and after that make ion-content his own scroll and then hide scroll bar for ion-content. The result's ion-content with the hidden working scroll bar. Need to use CSS Custom Properties. Add styles to global scope.


1 Answers

You can use showsIndicators: false to hide the indicator:

ScrollView(showsIndicators: false) {     // ... } 
like image 78
JWK Avatar answered Sep 21 '22 14:09

JWK