Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide/remove the scrollbar in UIScrollview in iPhone? [duplicate]

Possible Duplicate:
Is there a way to hide the scroll indicators in an UIScrollView?

I am using the UIScrollview in my project.

In this I don't want scroll bar. I want it to hide or remove from the UIScrollview.

Any help will be appreciated.

like image 846
surendher raja Avatar asked Mar 23 '12 09:03

surendher raja


People also ask

How do I hide the scroll bar on my iPhone?

Is there any way to disable the right-hand scroll bar on the iPhone? Answer: A: Answer: A: There is no option to disable that feature.

How do I get rid of the double scroll bar?

The combination of html { overflow:auto; } and . site { overflow-x:hidden; } seems to be causing this. Remove both, if possible. (How to handle the main scrolling is best left to the browser, and not messed with by your own CSS.)

Can you hide the scrollbar?

To hide the scrollbar and disable scrolling, we can use the CSS overflow property. This property determines what to do with content that extends beyond the boundaries of its container. To prevent scrolling with this property, just apply the rule overflow: hidden to the body (for the entire page) or a container element.


Video Answer


2 Answers

Use

[scrollview setShowsHorizontalScrollIndicator:NO];
[scrollview setShowsVerticalScrollIndicator:NO];

Swift

scrollView.showsHorizontalScrollIndicator = false 
scrollView.showsVerticalScrollIndicator = false
like image 125
Nazik Avatar answered Sep 19 '22 21:09

Nazik


You need to set following properties for UIScrollView to NO.

1) setShowsHorizontalScrollIndicator:

2) setShowsVerticalScrollIndicator:

[myScrollView setShowsHorizontalScrollIndicator:NO];
[myScrollView setShowsVerticalScrollIndicator:NO];

Hope this helps you.

like image 33
Mick MacCallum Avatar answered Sep 23 '22 21:09

Mick MacCallum