Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8580135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:45:46+00:00 2026-06-11T20:45:46+00:00

I am having a problem with the new Auto Layout functionality. I add an

  • 0

I am having a problem with the new Auto Layout functionality.
I add an NSView called tableView as a subview of workingBox. workingBox also contains some other subviews that were added with Interface Builder

[self.window setFrame:frame display:YES animate:YES];
[workingBox addSubview:tableView];

My problem is that if any of the other subviews touch tableView then they will get resized in the animation. The subviews that are not near where tableView is being added remain the correct size. I have already tried setting NSViewNotSizable resizeMask on the subviews that are getting resized but it does not work. The only thing that works is moving the subview upwards (into the wrong position.


EDIT: I have added a constraint in code:

NSDictionary *viewsDictionary = NSDictionaryOfVariableBindings(divider);
NSArray *constraints = [NSLayoutConstraint constraintsWithVisualFormat:@"V:[divider(==1)]"
                                                               options:0
                                                               metrics:nil
                                                                 views:viewsDictionary];
[workingBox addConstraints:constraints];  

This keeps the NSView at 1px height but if I lock it to the top it prevents the superview growing

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:45:47+00:00Added an answer on June 11, 2026 at 8:45 pm

    I could not make this work by adding a constraint in code. However in Interface Builder I could see that there was a constraint for the NSView in question that was named ‘Bottom Alignment’. I changed this to a priority of 1 in the inspector and it stopped the NSView getting stretched down when the window expanded. I think this auto added constraint that I mentioned in my comment above had been the problem all along.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a problem lining up some icons and am new enough to css
having a problem with a new ASP NET app and ASPNETDB Installed on existing
I am having a new problem with the Zend Gdata library where I am
I'm having this problem on a new cruisecontrol.net install running on Windows Server 2003
I'm having a problem with the new google maps api when adding multiple markers
I am having problem saving additional information about each user automatically when a new
Hello I am a new user to Python and I am having problem doing
I'm new to perl and having a problem matching a particular portion of a
I'm new in monotouch and I'm having a problem using NavigationViewController: In the FinishedLauching
I am new to C# and I am having a problem. I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.