Re: Delegate not getting called for CATiledLayer
Re: Delegate not getting called for CATiledLayer
- Subject: Re: Delegate not getting called for CATiledLayer
- From: "douglas a. welton" <email@hidden>
- Date: Sun, 6 Apr 2008 14:17:24 -0400
Hi John,
I have solved the problem.
My view was being used as the documentView in a NSScrollView class.
The AppKit release notes clearly state that if you want to use a layer-
backed view as a documentView, that you should also set the
NSScrollView to "wantsLayer". I had not set the NSScrollView
properly. One click in the Interface Builder and "voila!" everything
worked as expected.
regards,
douglas
On Apr 5, 2008, at 2:36 PM, John Clayton wrote:
Interesting...
I've got a CATiledLayer derived class that sits in a scrollview,
we've tested it here and it can render properly across two 30 inch
monitors no worries, i.e. it works. But I notice you say 'delegate'
here. Our stuff works via derivation instead of delegates. We
derive a layer from CATiledLayer, if you have the opportunity to
separate your drawing logic in this manner, then in the init method
make sure you switch needsDisplayOnBoundsChange to YES and then put
some drawing code into
- (void) drawInContext:(CGContextRef)ctx
I'd be keen on knowing how you get on with this - ping me back if it
works :-)
---
john clayton
shinywhitebox
On 5/04/2008, at 8:01 PM, douglas a. welton wrote:
Hi all,
I'm developing an application that uses a CATiledLayer to host
several sublayers full of user manipulated image content. The user
can set any size for the CATiledLayer and therein lies the rub. If
I set a size with both horizontal and vertical dimensions less than
2046, my -drawLayer:inContext: delegate method gets called without
a problem... However, if either dimensions size is bigger than the
magic number, the drawing delegate is not called at all.
Am I incorrect in believing that CATiledLayers can exceed the 2046
x 2046 size mentions in the AppKit release notes? If not, what
other alternatives (besides skipping the use of CALayers) do I have
for handling big documents with layers?
thanks,
douglas
_______________________________________________
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