ILPDFKit icon indicating copy to clipboard operation
ILPDFKit copied to clipboard

Zooming no longer functioning?

Open SmartASCII opened this issue 3 years ago • 3 comments

It looks like somewhere along the way, zooming on documents stopped working?

I partially fixed this in ILPDFView by:

  • Assigning a maximumZoomScale to the UIScrollView in didMoveToWindow
  • Defining viewForZoomingInScrollView to return _pdfDocumentView

This almost works (albeit laggy), but updateWithZoom seems to not be correctly calculating the X-axis for the annotations on the document. Y axis seems to be spot on.

It looks like updateWithZoom is scaling its original frame with the UIScrollView's zoom factor, so I'm not sure how this is going wrong.

SmartASCII avatar May 25 '21 21:05 SmartASCII

It looks like somewhere along the way, zooming on documents stopped working?

I partially fixed this in ILPDFView by:

  • Assigning a maximumZoomScale to the UIScrollView in didMoveToWindow
  • Defining viewForZoomingInScrollView to return _pdfDocumentView

This almost works (albeit laggy), but updateWithZoom seems to not be correctly calculating the X-axis for the annotations on the document. Y axis seems to be spot on.

It looks like updateWithZoom is scaling its original frame with the UIScrollView's zoom factor, so I'm not sure how this is going wrong.

I have the same problem, have you solved it yet?

PretttyC avatar Oct 21 '21 06:10 PretttyC

Have anyone fixed this? Thanks!

saormart avatar Oct 20 '22 16:10 saormart

It seems that the function "scrollViewDidZoom" located in the file "ILPDFView.m" is not get called. I was able to fix it by implementing the following code on the same file "ILPDFView.m":

#pragma mark UIScrollViewDelegate methods

  • (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView { return _pdfDocumentView; }

It fixed the zoom issue, but still messing up with the textfields... Any better idea?

saormart avatar Oct 21 '22 17:10 saormart