Re: PDFView in layer backed view appears white
Re: PDFView in layer backed view appears white
- Subject: Re: PDFView in layer backed view appears white
- From: John Calhoun <email@hidden>
- Date: Mon, 6 Apr 2009 11:10:43 -0700
On Apr 6, 2009, at 6:31 AM, Memo Akten wrote:
Hi, I would like to add a PDFView to another view. But if my root
view is layer backed I see nothing (just white).
The PDFView contains a subview. You can get to it via: -[PDFView
documentView]. Perhaps retain this subview, remove from super, and
add the subview to a layer backed view. I can think of a number of
ways this may fail though (haven't tried it), so don't get your hopes
up.....
If you simply want to display a single page though, just create your
own NSView subclass and call PDFPage's draw method in your views
drawRect method. You can set the needed scale on the current graphics
context to have the PDFPage draw at the correct size.
Also, don't forget to erase to white before calling PDFPage's draw.
John Calhoun—_______________________________________________
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