I am tryin to draw an indicator in a scrollview. i am trying with following code. It is not drawing anything at all. What could be the problem ?
- (void) drawScrollIndicator {
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(context, 10.0);
CGContextSetStrokeColorWithColor(context, [UIColor redColor].CGColor);
CGContextMoveToPoint(context, 0, 0);
CGContextAddLineToPoint(context, 0, self.frame.origin.y / 2);
CGContextStrokePath(context);
}
- (void)scrollViewDidEndDeceleratingUIScrollView *)scrollView {
[self drawScrollIndicator];
}
- (void) drawScrollIndicator {
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(context, 10.0);
CGContextSetStrokeColorWithColor(context, [UIColor redColor].CGColor);
CGContextMoveToPoint(context, 0, 0);
CGContextAddLineToPoint(context, 0, self.frame.origin.y / 2);
CGContextStrokePath(context);
}
- (void)scrollViewDidEndDeceleratingUIScrollView *)scrollView {
[self drawScrollIndicator];
}