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 7178727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:58:41+00:00 2026-05-28T16:58:41+00:00

Being a somewhat proficient iOS developer, I have just started working on a desktop

  • 0

Being a somewhat proficient iOS developer, I have just started working on a desktop OSX project in Cocoa and I’m running into issues that I just can’t grasp. So this question is for the OSX developers out there.

I don’t like the Interface Builder much, so I tend to write my views in code. The most prominent method I write my view layout code in is a view controller’s loadView method, and at least on iOS I use autoresizingMasks for everything. Try out the view small, large, rotated landscape and portrait and if all is dandy, I continue with the next item on my list. Now on the desktop, the autoresizingMask works (or just looks) a little bit different. First of all the properties have different names, but their behavior also seems weird or unexpected.

When I ran into the issue below, I thought it must be my code was wrong, so after trying out long enough I re-created it with Interface Builder just for confirmation’s sake, and guess what: I got the exact same result. Take a view with four vertically stacked subviews. Set the middle two to have flexible heights, the outer ones to be fixed. When you run it, size it down and back up again, I get two completely different layouts before and after the resize. See image:

enter image description here

Now I can follow why this happens from a mathematical standpoint between run loops, but from the point of an ‘autosizing’ or ‘autoresizing’ feature, this makes absolutely no sense.

Before I try to write the mother-of-all-resizing-topics here, might I ask you these questions? Feel free to elaborate some more on the resizing topic if you feel it adds to the post.

  1. Am I a fool for not wanting to use the Interface Builder on desktop projects?
  2. Should I depend on the autoresizingMask less than I would on iOS projects?
  3. What are decent alternatives to making sure your layout lives up to standards without Interface Builder?

Cheers!

  • 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-05-28T16:58:42+00:00Added an answer on May 28, 2026 at 4:58 pm
    1. Yes, in my opinion. 🙂

    2. You should depend on it when it does what you need. When it’s insufficient, override resizeSubviewsWithOldSize: and/or resizeWithOldSuperviewSize: (or see below).

    3. ???

    If you can target 10.7, look at the new constraint-based layout system. Check out the Cocoa Autolayout video from WWDC 2011.

    You could also set minSize on your NSWindow to something large enough to prevent the singularity.

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

Sidebar

Related Questions

I have a somewhat-long-running stored procedure being called from a PB application. I want
Sorry for being somewhat vague but so is the project I'm leading now. I
I'm working on a project right now where I have been slowly accumulating a
I'm working on a big project, some might say awesome. The project is being
I have a somewhat large server process written in .net-3.5, that is, running in
I have come across a somewhat annoying problem during a project. I created this
I admit to being somewhat of a copy and paste JavaScript developer (with a
Being somewhat typographically obsessed, I am curious: what is the best way to present
Being a C# developer since version 1.0, F# has captured my free time for
Being primarily a C++ developer the absence of RAII (Resource Acquisition Is Initialization) in

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.