2

I have UIScrollView which i populate with UIImageViews programmatically. After that I change contentSize of scrollview so I can scroll it. It works fine, but I don't see scrollers and it bothers me. I've set to show them in .xib, and I've even set "showHorizontalScrollIndicator" property programmatically, but I still can't see scrollers.

Does anyone have any idea why I can't see scrollbars and how I can make them appear?

BTW I don't mean I wan't to see them at all times, I just want standard behavior, but they aren't shown even when I'm scrolling.

4
  • 4
    are you sure the size of the scroller is not out of super view bounds? Commented Jun 9, 2012 at 9:38
  • Size of scrollview, you say? Yes, it's not out of bounds. If you mean something else - please clarify.
    – Protheus
    Commented Jun 9, 2012 at 12:19
  • 5
    You might be removing all the subviews of your scrollview, including scroll indicators. Commented Jun 9, 2012 at 13:10
  • As a matter of fact yes, yes I was removing all subviews. Now I'm checking class before removing subview. Thank you. Post it as an answer, because it's the right one. At least for me.
    – Protheus
    Commented Jun 9, 2012 at 14:26

1 Answer 1

8

I was removing subviews and scroll indicators were of them.

I fixed it at first by checking type of subviews I was removing, then I changed the logic and didn't remove subviews at all.

1
  • 1
    Just discovered I was doing that too. Well spotted Protheus & erkanyildiz!
    – Ted
    Commented Oct 25, 2012 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.