Using PDFView with AutoLayout? -
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC: Using PDFView with AutoLayout?

Using PDFView with AutoLayout? 1 year 5 months ago #13081

  • smccoole
  • smccoole's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
I am evaluating RadaeePDF for use in a React Native application and although I have gotten it to work on iOS I do have an additional question.

It seems that I have to initialize the PDFView with a set frame size, otherwise the PDF document will not be displayed at all. The frame size seems to be used for several setup steps when the vOpen method is called?

React Native uses a flex layout where it sets the size later in the process. I tried setting up AutoLayout rules to resize the PDFView but it did not work. I finally worked around it by initializing the PDFView at maximum screen size and then adjusting to the actual view size in an overridden reactSetFrame call, resizing the PDFView frame, calling PDFView:sizeThatFits and PDFView:resetZoomLevel (only if the current page is not -1, it is the first time the frame is resized and it caused resetZoomLevel to crash).

Is this pretty much the only way to get the PDFView to size the way I want it? I can't just set it full screen. If I have to go with this I can, just wondering if there is a better way.


Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum