0

I created a UIScrollView with a CATiledLayer for a 10000x8078 image.

Would I place this image in a UIView the zoomScale is always updated according to the contentSize (respectively the size of the image).

With CATiledLayer the contentSize now varies according to the tiles in use.

How can I now determine the correct zoomScale of the UISrcollView?

Thanks

1 Answers1

1

What has worked for me, based on the the ZoomingPDFViewer Sample Code, is to keep tabs on the zoom manually the following way in the UIScrollView delegate:

- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale
{

    scrollView.scrollEnabled = YES;
    // set the new scale factor for the TiledPDFView
    pdfScale *=scale;
        ....
fsaint
  • 8,759
  • 3
  • 36
  • 48