CustomScrollIndicator 0.1.1

CustomScrollIndicator 0.1.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Jérôme Morissard.



  • By
  • Morissard Jérome

An iOS customizable ScrollIndicator

  • allows to customize UIScrollView scroll indicators,
  • Only one category

Image Image

Enum to configure indicator positions

typedef enum {
  JMOVerticalScrollIndicatorPositionRight     = 1 << 0, //Default for vertical
  JMOVerticalScrollIndicatorPositionLeft      = 1 << 1,
  JMOHorizontalScrollIndicatorPositionBottom  = 1 << 2, //Default for horizontal
  JMOHorizontalScrollIndicatorPositionTop     = 1 << 3,
} JMOScrollIndicatorPosition;

Enum to configure indicator type

typedef enum {
    JMOScrollIndicatorTypeClassic = 0, //Default
    JMOScrollIndicatorTypePageControl
} JMOScrollIndicatorType;

Usage ... very simple, just enable the customization (with default parameters)

[scrollView enableCustomHorizontalScroll];

With options

 [scrollView4 enableCustomScrollIndicatorsWithScrollIndicatorType:JMOScrollIndicatorTypeClassic 
              positions:JMOHorizontalScrollIndicatorPositionTop 
              color:[UIColor orangeColor]];

Refresh ... call methods in your scrollViewDelegate (scrollViewDidScroll is optionnal, KVO did the job)

- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
    [scrollView refreshCustomScrollIndicatorsWithAlpha];
}

- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{
    [UIView animateWithDuration:0.25 animations:^{
        [scrollView refreshCustomScrollIndicatorsWithAlpha:0.0];
    }];
}