• 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
PDFView drawPage called often after selecting text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PDFView drawPage called often after selecting text


  • Subject: PDFView drawPage called often after selecting text
  • From: Martin Hewitson <email@hidden>
  • Date: Mon, 07 Jan 2013 11:10:16 +0100

Dear list,

I have an app which has a main split view. In the left panel there is a text editor (NSTextView), in the right panel there is a PDFView. I find that when typing in the text view, the -drawPage: method of the PDFView is called about once every 200ms but only if the PDFView is displaying a (large) graphic. I have this method overridden because I do some additional drawing. The problem is that if the drawing of the PDF page is heavy (due to the complex graphic), then the responsiveness of the text view becomes noticeably poorer. In fact the responsiveness of the whole app is affected.

The strange thing is, that this behaviour is only triggered if I have selected text in the PDF at least once since loading the PDF document. If text has never been selected, then the -drawPage: is called only a couple of times at the beginning or when scrolling (as expected), but not when typing in the text view or doing other non-pdf related actions. Clearing the selected text (by just clicking somewhere on the PDFView) doesn't rectify the problem - it persists until the app is restarted.

Can anyone explain to me why the -drawPage: method of PDFView is being called when I'm typing in the text view? I'm pretty sure I'm not calling it anywhere in my app.  I've also checked that -setNeedsDisplay: is not being called on the PDFView.

Could this be a PDFKit bug?

Best wishes,

Martin


_______________________________________________

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: PDFView drawPage called often after selecting text
      • From: Martin Hewitson <email@hidden>
  • Prev by Date: Re: NSViewController in the responder chain
  • Next by Date: Re: PDFView drawPage called often after selecting text
  • Previous by thread: coredata count not fulfill fault after object delete
  • Next by thread: Re: PDFView drawPage called often after selecting text
  • Index(es):
    • Date
    • Thread