• 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, centering document view?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSScrollView, centering document view?


  • Subject: Re: NSScrollView, centering document view?
  • From: Daniel Vollmer <email@hidden>
  • Date: Thu, 10 Feb 2011 10:19:13 +0100

Hi,

On 30 Jan 2011, at 06:38, Todd Heberlein wrote:

> Is there an easy way to do this? Or should I make sure my document view is always at least as large as the content view and then just center my drawing inside my document view?

Here's a sub-class of NSClipView that does that. I have to admit I don't quite remember where I got the pointers from (probably CocoaDev).

Attachment: SICenteringClipView.h
Description: Binary data

Attachment: SICenteringClipView.m
Description: Binary data


	Daniel.
_______________________________________________

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: Re: document types question
  • Next by Date: Re: NSOutlineView + NSButtonCell weird bug
  • Previous by thread: Re: document types question
  • Next by thread: Re: Cocoa Finder Hooks
  • Index(es):
    • Date
    • Thread