• 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
Subclassing NSClipView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Subclassing NSClipView


  • Subject: Subclassing NSClipView
  • From: Kiel Gillard <email@hidden>
  • Date: Wed, 1 Apr 2009 15:25:52 +1100

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 (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


  • Prev by Date: Deep thought about "Cannot remove an observer <NSKeyValueObservance XXXX> for the key path "count" .."
  • Next by Date: NS <-> CG Rect Conversion and screen coordinates
  • Previous by thread: Deep thought about "Cannot remove an observer <NSKeyValueObservance XXXX> for the key path "count" .."
  • Next by thread: NS <-> CG Rect Conversion and screen coordinates
  • Index(es):
    • Date
    • Thread