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: Memo Akten <email@hidden>
- Date: Tue, 7 Apr 2009 10:37:27 +0100
Thanks John, the second approach seems like it makes the most sense
for my needs. cheers.
On 6 Apr 2009, at 19:10, John Calhoun wrote:
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
_______________________________________________
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