Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think it should work with a NSLayoutConstraint, I work at the moment on at :).</p> <p>EDIT:</p> <p>Maybe to provide more details on my <strong>answer</strong> based on the comment hayden. You can define a constraint either by code or in the the IB. In the IB select your left subview and click on the constraint buttons in the lower right corner defining a width constraints. If you select this new constraint now you can setup the the width an say it should be equal and set the size you like.</p> <p>The seconed way is to create in code a NSLayoutConstraint object, i do it like this (this is just an example, and define not a fix width).</p> <pre><code> // define for the view: Constraint and AutoresizingMask option NSView *view = self.view; [view setTranslatesAutoresizingMaskIntoConstraints:NO]; // disable AutoresizingMask NSDictionary *views = NSDictionaryOfVariableBindings(view); [view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"[view(&gt;=140,&lt;=220)]" options:0 metrics:nil views:views]]; </code></pre> <p>In general you find documentation to this topic under the term <a href="https://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AutolayoutPG/Articles/Introduction.html" rel="nofollow">Auto Layout</a>. To use it you have to enable auto layout and this featuer replace the old autosizing functions. (therefore i disable autosizing mask in the code). </p> <p>This feature is quit new and you can do complex stuff with it but i think I is worth to study.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload