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

Re: setAccessoryView


  • Subject: Re: setAccessoryView
  • From: Joshua Minor <email@hidden>
  • Date: Tue, 05 Apr 2005 11:49:22 -0700

I found that I had to set the autoresizing mask of the accessory's superview also. It looks like there is one more level of nested views in 10.3 than 10.2.

	// grab the resize mask that was set in our nib
	unsigned int mask = [accessory autoresizeMask];
	// set the accessory view (this sets the resize mask to 0)
	[sheet setAccessoryView:accessory];
	// put our resize mask back
    [accessory setAutoresizingMask:mask];
	// apply the resize mask to the accessory's superview also
    [[accessory superview] setAutoresizingMask:mask];

-joshm

Joshua Minor
Graphics Software Engineer
Pixar Animation Studios

What happens if, after setAccessoryView:, you send setAutoresizingMask: to your view?

 -- F

 On 11 May 2004, at 4:22 PM, Eric Long wrote:


I am using setAccessoryView for an NSOpenPanel. Everything seems to work
properly with one caveat. I'd like my custom view to resize when the panel
is resized, along with by view's subviews.


 The nib settings don't seem to be considered. The view always appears
 centered with a fixed size.

 Is there a way to bind the view's width to the panel's width?


-- Fritz Anderson Consulting Programmer http://resume.manoverboard.org/



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: weird problem with IB
  • Next by Date: Re: weird problem with IB (update)
  • Previous by thread: Re: weird problem with IB (update)
  • Next by thread: get controller class name from another class.
  • Index(es):
    • Date
    • Thread