• 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
Re: NSScrollView: Scrollers invisible under Mac OS X 10.6
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSScrollView: Scrollers invisible under Mac OS X 10.6


  • Subject: Re: NSScrollView: Scrollers invisible under Mac OS X 10.6
  • From: Matthias Arndt <email@hidden>
  • Date: Fri, 4 Sep 2009 20:06:17 +0200

Hi Graham, hi Kyle!

Another thing to be aware of is that if you do it right, the ruler views managed by the scrollview also "just work" and allow for the view's zoom. I don't think you should be doing what you're doing to the NSClipView.

I don't know what crossed my mind, but I used methods in my NSDocument class to scale the clip view ... When looking into Graham's GCZoomView I found nearly 90% of my code (although much better structured!), but used for scaling the custom view. I think I got a better understanding of scroll views, now:


NSDocument -> NSScrollView -> NSClipView -> Custom View

The document wires IBActions for zoom actions. The scroll view provides rulers / scrollers (more or less) automatically and contains a subview with the clipped content of the custom view. The scaling is done in the custom view itself, changing its frame size, but its internal coordinates remain unchanged.

Things have worked out well, the scrollers appear just as expected. Tomorrow I just have to tweak a little for zooms < 1, as the custom view should not be reduced < 100% (to show e. g. a grid), but the drawing itself has to. So problem, I did that before by handling the zoom factor inside -drawRect.

Thanks again a lot for your help!

Matthias
_______________________________________________

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


References: 
 >NSScrollView: Scrollers invisible under Mac OS X 10.6 (From: Matthias Arndt <email@hidden>)
 >Re: NSScrollView: Scrollers invisible under Mac OS X 10.6 (From: Kyle Sluder <email@hidden>)
 >Re: NSScrollView: Scrollers invisible under Mac OS X 10.6 (From: Matthias Arndt <email@hidden>)
 >Re: NSScrollView: Scrollers invisible under Mac OS X 10.6 (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: performSelectorInBackground:anObject:
  • Next by Date: Re: Need a launch/loading screen to be displayed while app is starting/initializing?
  • Previous by thread: Re: NSScrollView: Scrollers invisible under Mac OS X 10.6
  • Next by thread: Re: learning the NSView structure of an app?
  • Index(es):
    • Date
    • Thread