Skip navigation.
 
mlRe: Interface Builder "layout" versus "frame"
FROM : John Stiles
DATE : Thu Nov 08 22:46:28 2007

So far I've been going into IB, making a control, measuring each 
margin by hand, and hard-coding it. Then I've added a category to 
each view I care about which can return the margin info. That way 
it's pretty easy to account for it when calculating sizes and positions.

It's been a little slow going, but it does work.

I hate doing stuff which I know to be fragile, but I guess if they 
changed it, then everyone's nibs would be broken too. So I can't 
imagine this breaking without tons of existing layouts also being 
broken.


On Nov 8, 2007, at 1:41 PM, Ken Ferry wrote:

> Hi John,
>
> Sorry; this is a long standing request, but this information isn't
> available.  IB isn't retrieving the info from the frameworks, it has
> its own internal rules.
>
> -Ken
> Cocoa Frameworks
>
> On Nov 8, 2007 10:26 AM, John Stiles <<email_removed>> wrote:

>> I've noticed that Interface Builder shows not only a "frame" value
>> for object sizes, but also a "layout" value.
>>
>> I am trying to create a few controls programatically and it seems
>> like I'd get results a lot closer to what I'm expecting if I could
>> create them with a "layout" rectangle instead of a "frame" rectangle.
>> For instance, if I make an NSTabView, it's significantly inset
>> compared to the NSRect I've set. But if I go into IB and create a tab
>> control and set up its "layout" rectangle to match what I want, the
>> positioning is perfect.
>>
>> So programatically, how do I work with "layout" rectangles instead of
>> "frames"?
>>
>> I know that technically I could just hard-code the margin sizes of
>> controls but I am hoping to avoid this… it doesn't seem future-proof.
>>
>> _______________________________________________
>>
>> Cocoa-dev mailing list (<email_removed>)
>>
>> 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:
>> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>>
>> This email sent to <email_removed>
>>

Related mailsAuthorDate
mlInterface Builder "layout" versus "frame" John Stiles Nov 8, 19:26
mlRe: Interface Builder "layout" versus "frame" Joe Ranieri Nov 8, 19:34
mlRe: Interface Builder "layout" versus "frame" John Stiles Nov 8, 19:44
mlRe: Interface Builder "layout" versus "frame" Joe Ranieri Nov 8, 20:05
mlRe: Interface Builder "layout" versus "frame" John Stiles Nov 8, 20:06
mlRe: Interface Builder "layout" versus "frame" Joe Ranieri Nov 8, 20:07
mlRe: Interface Builder "layout" versus "frame" Jim Correia Nov 8, 20:29
mlRe: Interface Builder "layout" versus "frame" John Stiles Nov 8, 20:34
mlRe: Interface Builder "layout" versus "frame" Ken Ferry Nov 8, 22:41
mlRe: Interface Builder "layout" versus "frame" John Stiles Nov 8, 22:46