I have a UIScrollView which I create and size dynamically using...
scrollView.contentSize = CGSizeMake(scrollView.frame.size.width , length);
I then add subviews
to the UIScrollView
.
I do have scrollView.showsVerticalScrollIndicator = YES;
When scrolling the scroll indicator never appears.
Even if I call [scrollView flashScrollIndicators]
nothing happens.
Ideas?
For me, the horizontal indicator had mysteriously disappeared in my app on iOS 7. Later found out that for some strange reason, I had to enable both
Shows Horizontal Indicator
andShows Vertical Indicator
to make the horizontal one show up. If I set it to not show the vertical indicator, it would also not show horizontal indicator.Had the same problem and couldn't find the cause. The last answer gave the final hint: whenever I added new subviews I first removed all existing subviews from the scrollview (and apparently also the scroll indicators).
After checking in my loop, if the subview really was of the kind I wanted to be removed the scroll indicators showed up:
Update: changed code to Nikolai's suggestion