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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:03:42+00:00 2026-06-18T00:03:42+00:00

In my storyboard the App workflow design is like this -> NavigationController -> ViewControllerX

  • 0

In my storyboard the App workflow design is like this

-> NavigationController -> ViewControllerX -> TabBarController -> NavigationController -> ViewControllerA
                                                               -> NavigationController -> ViewControllerB
                                                               -> NavigationController -> ViewControllerC

Regarding the encapsulation design pattern I wonder which of the following approaches would be best to share data on segueing from ViewControllerX to the TabBarController containing ViewControllerA/B/C:

  1. Subclassing the TabBarController with a custom property. Then on segueing the data is passed to the TabBarController. Each of the ViewControllerA/B/C “pulls” the data in viewDidLoad with CustomVar *myCustomVariable = self.tabBarController.myCustomVariable.

  2. Create a singleton.

I’d prefer approach 1 as there are some more ViewControllers in the project and the sharing is only between ViewControllerX and ViewControllerA/B/C. Are there any issues with that?

  • 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-18T00:03:43+00:00Added an answer on June 18, 2026 at 12:03 am

    I don’t see any issue at all. That’s the way I go every time I face a similar situation. With a “simple” situation like this one, no need to look for something more complicated than that.

    I don’t really have anything to support my answer, except my own experience. I see nothing bad in the approach 1.

    About the solution 2, I usually use the AppDelegate “as a singleton” when I have a data needed throughout the application. I’ve heard good and bad things about that, but I have never faced anything bad, and I’ve been using it quite a lot. But given your situation, I’d rather go with solution 1. I’d say solution 2 is for data used in the whole application workflow.

    EDIT :

    Here’s how to use your AppDelegate as a singleton.

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

Sidebar

Related Questions

This is my scenario: I have an app with TabBar and NavigationController using storyboard.
I have this iPad app using Storyboard. There are some file that are marked
I'm trying to design my app's interface in IB using a storyboard and have
I have an app on AppStore that I would like to improve with StoryBoard.
In my iPad app storyboard design, there are two table views added. One table
If an app is developed using Storyboard in Xcode 4.2, can this app run
I have 2 storyboard files in my app and I'd like to transition between
I have a storyboard enabled App with a TabBarController where I have added viewcontrollers
I am building an app using storyboard. I have added a table view to
I am getting a bit confused. I am creating an app with storyboard, and

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.