Re: IB3 plugin for custom view, how to forbid resizing in one direction?
Re: IB3 plugin for custom view, how to forbid resizing in one direction?
- Subject: Re: IB3 plugin for custom view, how to forbid resizing in one direction?
- From: "Sean McBride" <email@hidden>
- Date: Tue, 27 May 2008 13:30:13 -0400
- Organization: Rogue Research
On 5/27/08 12:59 PM, Brandon Walkin said:
>You'll need to implement -(NSSize)ibMaximumSize in your view's
>integration class and return the height of your view and an
>arbitrarily large width (like 100000). Then you'll get the IB behavior
>you were talking about.
I had tried ibMinimunSize but found that it did not have any effect, so
I figured I was at a dead end. It seems in fact that one must implement
_both_ ibMinimunSize and ibMaximunSize. Thanks for this hint. So if I do:
- (NSSize)ibMinimumSize
{
return NSMakeSize (21, 21);
}
- (NSSize)ibMaximumSize
{
return NSMakeSize (CGFLOAT_MAX, 21);
}
Then IB does indeed stop me from changing the height, but it still lets
me make the width less than 21. Why?
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden