Hi all,

Bill Dudney provides this sample app to show a CATiledLayer presenting a large image in multiple levels of detail <http://bill.dudney.net/roller/objc/entry/catiledlayer_example >. In his sample code, he implements a rudamentary form of scrolling with the arrow keys.

I'd like to subclass NSClipView to allow me to scroll a sublayer of the document view's backing layer.

The idea is to reposition the sublayer of the document view's backing layer when the scroll bars are manipulated, just as if I where to press an arrow key in the sample app. Furthermore, I'd like the scroll bars to consider the size of the sublayer of the backing layer of the document view instead of the size of the document view. This allows me to have a sublayer that is potentially larger than it's superlayer (the backing layer of the document view).

I've been able to reposition the sublayer when the scroll bars are clicked by overriding NSClipView's scrollToPoint: method. However, I can't seem to or I don't see how I can make my NSClipView subclass use the bounds and frame of the sublayer without manipulating the document view's frame. This problem gives situations such as the scroll bars not accurately representing the length of the sublayer.

Has anyone ever attempted to do something like this before? Any suggestions or ideas would be appreciated!

Thanks :-)

Kiel
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to