• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Adding subviews to a PDFView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding subviews to a PDFView


  • Subject: Adding subviews to a PDFView
  • From: Antonio Nunes <email@hidden>
  • Date: Sun, 11 Nov 2007 19:42:26 +0000

Hi,

I use a PDFView to show PDF documents. I need to add an NSTextView as a subview of its documentView to provide editing capabilities (and using an annotation text widget won't cut it unfortunately). However, the view coordinates that convertRect:fromPage: provides return coordinates relative to the PDFView itself, not to its underlying documentView, so I know of no way to obtain the correct offset for the target page. Further, when zooming the PDFView, the NSTextView won't scale along. It remains at constant size. This is surprising since I would have thought the documentView or one of its superviews to be scaled, but apparently, this is not the case and it looks rather like something below the documentView is scaled.

I tried adding the text view as a subview of the PDFView directly, and that allows me to place it on the correct page, and it all functions perfectly fine until the PDFView either gets zoomed or scrolled. The NSTextView will neither zoom nor scroll.

So that begs the question:
What is the correct way to add subviews to a PDFView such that they can be correctly positioned, and will zoom and scroll along with their superView(s)?
If there is no proper way to do it, any hints as to how to hack my way around it? I could live with a solution that creates direct subview's of the PDFView as long as I can make them scale and scroll along with the view's contents.


-António

----------------------------------------------------
It is better to light a candle than to curse the darkness
----------------------------------------------------



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Adding subviews to a PDFView
      • From: John Calhoun <email@hidden>
  • Prev by Date: SMS PDU encoding
  • Next by Date: The New IB
  • Previous by thread: Re: SMS PDU encoding
  • Next by thread: Re: Adding subviews to a PDFView
  • Index(es):
    • Date
    • Thread