I have a scrollView with an imageView inside of it. The scrollView
is a subView of the superView, and the imageView is a subView of the scrollView
.
I also have a label (at the super-view level) that receives updated values on its text property from a NSTimer every millisecond.
The problem is: During scrolling, the label stops to display the updates. When the scrolling is end, updates on the label restart. When updates restart they are correct; this means that label.text values are updated as expected, but while scrolling, updates display is overriden somewhere. I would like to display updates on the label regardless of scrolling or not.
Here is how the label updates are implemented:
- (void)startElapsedTimeTimer {
[self setStartTime:CFAbsoluteTimeGetCurrent()];
NSTimer *elapsedTimeTimer = [NSTimer scheduledTimerWithTimeInterval:0.001 target:self selector:@selector(updateElapsedTimeLabel) repeats:YES];
}
- (void)updateElapsedTimeLabel {
CFTimeInterval currentTime = CFAbsoluteTimeGetCurrent();
float theTime = currentTime - startTime;
elapsedTimeLabel.text = [NSString stringWithFormat:@"%1.2f sec.", theTime];
}
Thanks for any help.