Hello, first sorry for my poor english.
I have developed a Gigapixel Visor with UIScrollView, using CALayer for tiles, Currently is working with user interaction (dragging, zooming, etc), but I need reload the tiles when the Scroll is zooming or moving without user interaction
I have this code:
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(onTimer) userInfo:nil repeats:YES];
[UIView animateWithDuration:5.0
delay:0.0
options:UIViewAnimationOptionBeginFromCurrentState
animations:^{
[self.scroll zoomToRect:endZoom animated:NO];
}
completion:^(BOOL finished){
[self.scroll reloadTiles];
}];
- (void) onTimer
{
NSLog(@"%@",NSStringFromCGPoint(self.scroll.contentOffset));
NSLog(@"%f",self.scroll.zoomScale);
}
The problem: UIScrollView is returning the coordinates and scale from endZoom and not the intermediate coordinates and scale. I have tried with presentationLayer, but I can´t get the current scale, and the coordinates from presentationLayer is not precise enough. it´s possible?
Thanks.