13

I have a UITextView with text that needs to be scrolled to see the complete text.

But there are paragraphs between the text blocks and it is not really obvious that the text is scrollable without starting to scroll so that the scroll indicator becomes visible. This is because the emtpy lines between paragraphs are just on the bottom of the visible text within the text view.

While I could insert some empty lines so that a text block gets broken up and the user could see that the text goes on, the issue is that the app will be translated to many languages and this solution is therefore not feasible anymore. Since all languanges would have to be tested individually and for each the empty lines will be inserted at different places.

That's why I am asking, if there is a way to indicate to the user that the shown text continues if he scrolls down - immediately when the view opens - so without the user tapping on the screen.

Many thanks

user387184
  • 10,953
  • 12
  • 77
  • 147
  • 1
    http://stackoverflow.com/questions/3281900/tableviewcontroller-doesnt-flash-scroll-indicators-even-if-the-table-is-bigger – danqing Aug 21 '12 at 17:47

5 Answers5

25

Since UITextView is a subclass of UIScrollView you can use the method flashScrollIndicators. This method flashes the scroll indicators of the scrollView, this is the way to show users that content is scrollable.

Matthias Bauch
  • 89,811
  • 20
  • 225
  • 247
12

You could try this:

[yourTextView flashScrollIndicators];
swiftBoy
  • 35,607
  • 26
  • 136
  • 135
Ravi
  • 7,929
  • 6
  • 38
  • 48
1

I would hide the built-in scroll indicator and implement your own. Just create a custom view that looks like the scroll indicator, and determine it's position by the scrollOffset of the UITextView.

James
  • 2,272
  • 1
  • 21
  • 31
0

There is a solution provided in this site where you will be able to have your scroll bars visible all the time. Basically what you will be doing is creating a category for your UITextView.

That being said, Apple's Human Interface Guidelines discourage this, and they only provide a method to flash the scroll indicators. So you could call the flashScrollIndicators method on sensible moments i. e. when the user is first presented with the ViewController containing you UITextView.

El Developer
  • 3,345
  • 1
  • 21
  • 40
0

Code in Swift:

textView.flashScrollIndicators()
Eric Aya
  • 69,473
  • 35
  • 181
  • 253
p-mercier
  • 1,036
  • 11
  • 10