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

  • Home
  • SEARCH
  • 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 5933933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:02:36+00:00 2026-05-22T15:02:36+00:00

Situation: The UI of an app is based on a UISplitView with two UINavigationController

  • 0

Situation: The UI of an app is based on a UISplitView with two UINavigationControllers on the left and right side. Several custom views with their corresponding UIViewControllers are embedded in each UINavigationController.

Some possible approaches: The class documentation suggests to use delegates to communicate between subviews, as demonstrated also in this excellent tutorial. If this is done on the level of the custom views (inside each UINavigationController as both Apple’s template and Ray’s tutorial do), it will eventually get tedious as one would need delegates to handle all possible combinations of view controllers. So it seems better to subclass each UINavigationController and establish delegation between those two only. In that case, however, the navigation controllers may have to forward information to their sub-controllers that they do not need to know about – the delegation protocol would need to provide methods for a wide variety of events that might occur and the sub-classes become highly app-specific and duplicate communication of the subviews. As suggested in the answer in this post there are two further possibilities: a) responder chains, and b) notifications.

Question: What’s the best design pattern to handle this situation?

  • 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-22T15:02:37+00:00Added an answer on May 22, 2026 at 3:02 pm

    I have found a very good post on this question on Cocoa with love. One of the key ideas is to introduce controller objects while iteratively refactoring the design until one ends up with classes that have a single purpose each.

    When applying it to a complex view hierarchy, I find the idea of having a larger hierarchy of controllers with limited scope each very appealing and practical. The resulting design will converge after a couple of iterations of refactoring the code.

    Practical application: For the left to right communication of view controllers, delegation – as recommended in the Apple documentation – is indeed most practical. If the left view needs to respond to the right view (a rare thing with the master/detail paradigm), I have used KVO as typically these kinds of updates may also be triggered by model objects and KVO is ideal for one-to-many communication patterns. I did not see a use of the target-action mechanism for controller communication.

    Update: I have found another blog post which addresses this particular situation on Cocoa is my girlfriend, see also the comment section of that entry. The post is a little basic and does not cover the workflow of a more complex application, but it is still useful for seeing other approaches to this kind of design. Furthermore, there is a tutorial by Ray Wenderlich which discusses such a design with a simple albeit practical example.

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

Sidebar

Related Questions

The situation I'm trying to solve: in my Cocoa app, I need to encrypt
I'm in a situation where I need to span Google App Engine entity relationships
I have an interesting situation where I need to deploy an ASP.NET MVC app
OK. This is a bit of a vanity app, but I had a situation
Situation: I have a simple XML document that contains image information. I need to
Situation: A PHP application with multiple installable modules creates a new table in database
Situation: text: a string R: a regex that matches part of the string. This
Situation: you've got a .swf embedded in an html page, and when you click
Situation: Site with content protected by username/password (not all controlled since they can be
Situation: Table TBL has ~10k entries for deletion, Table TBL has 14 child tables

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.