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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:23:20+00:00 2026-06-01T12:23:20+00:00

I have a window that contains several rather complex views. Right now, I’m using

  • 0

I have a window that contains several rather complex views. Right now, I’m using a single NSWindowController to control the UI for the window and all the views. It’s becoming a pretty huge class, since it’s dealing with the details of each and every view.

The view behaviors are independent from one another though, so I see an opportunity to put the UI logic for each view into a separate controller.

According to the Mac App Programming Guide, this is exactly what view controllers are for:

Use view controllers to divide up the work for managing more
sophisticated window layouts. Your view controllers work together
(with the window controller) to present the window contents.

However, I can’t find any documentation or examples on how this idea works in practice. Can I add multiple view controllers to the nib file in addition to the window controller?

  • 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-01T12:23:22+00:00Added an answer on June 1, 2026 at 12:23 pm

    If you add the view controllers to the nib, that’s where they’re going to be instantiated, and you’d add IBOutlets to the window controller (assuming that’s the nib’s File’s Owner) in order to connect them.

    In terms of memory, however, that scheme could become expensive, especially the more view controllers you have. You may want to instead consider lazily instantiating them in the window controller, (i.e., doing so only when needed), assuming this doesn’t result in an objectionable lag before the view is presented for the first time.

    Don’t be afraid to try both approaches. One of them may be best for you.

    In any case, I applaud you for your decision to factor out all that code into separate controllers. Very nice. Good luck to you in your endeavors.

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

Sidebar

Related Questions

I have a model window that contains expander control. This expander control when expanded
I have a window that contains one QTMovieView. How do I make it so
I'm running into a problem where, I have a Window that contains a child
I have asp.net form that contains fields. When I access this window, my javascript
We have a windows application that contains an ActiveX WebBrowser control. As part of
I have a WPF / XAML Window that contains a ComboBox that is giving
I'm working on several programs right now, and have become frustrated over some of
I have a windows mobile 5.0 application (smartphone) that contains a flat data file
I have a C# Windows Form application that contains a menu with this event:
I have a form MainForm which is a Windows Forms form that contains many

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.