• 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: IB3 plugin for custom view, how to forbid resizing in one direction?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Brandon Walkin <email@hidden>
  • Date: Tue, 27 May 2008 18:04:46 -0400

On 27-May-08, at 1:30 PM, Sean McBride wrote:

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?

I haven't been able to use these methods to get IB to stop a vertical or horizontal resize at a particular point. I don't think IB supports that behavior at the moment.


You'll notice that there are no standard controls that behave in this way. Interface Builder allows the user to resize controls to a non- useful size if the particular axis is resizable (for instance, a slider can be resized to a width of 5 points – not very helpful). There's probably a good reason for this (since the IB plugin architecture is fairly well thought out), but I'm not aware of what that is.

Brandon _______________________________________________
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


  • Follow-Ups:
    • Re: IB3 plugin for custom view, how to forbid resizing in one direction?
      • From: "Sean McBride" <email@hidden>
References: 
 >IB3 plugin for custom view, how to forbid resizing in one direction? (From: "Sean McBride" <email@hidden>)
 >Re: IB3 plugin for custom view, how to forbid resizing in one direction? (From: Brandon Walkin <email@hidden>)
 >Re: IB3 plugin for custom view, how to forbid resizing in one direction? (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: I'm new to Xcode, and . . .
  • Next by Date: Re: I'm new to Xcode, and . . .
  • Previous by thread: Re: IB3 plugin for custom view, how to forbid resizing in one direction?
  • Next by thread: Re: IB3 plugin for custom view, how to forbid resizing in one direction?
  • Index(es):
    • Date
    • Thread