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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:25:43+00:00 2026-06-13T06:25:43+00:00

I am designing an application with a tab bar at the bottom, representing 2

  • 0

I am designing an application with a tab bar at the bottom, representing 2 different sets of data that are the focus of my app. These sets are both of the same datatype but different collections (one is assigned entities, the other is nearby entities, but “entity” is the same type for both). Within each view controller there is also a toggle at the top for different views of that same data (one for a thumbnail-style view and another for a map view).

Based on my understanding that you wouldn’t use a 2-button tab bar controller with 1 shared instance of the same view controller across both tabs, I currently have the code split into 2 separate view controllers, one for “assigned entities” and one for “nearby entities”. The problem is the code here is exactly the same in each view controller. All that differs is the specific collection of entities. What I would like to do ideally is have 1 view controller with 2 arrays, 1 for each set of data, and have the data being used to populate the views change depending on which tab the user is on. Does anyone have any advice on doing this correctly? This certainly can’t be that unique of an issue but I’m not finding anything online to address this exactly. Typically I would think there’s something wrong with my initial design, running into a problem like this, but I think my design is sound and the approach I want to take is reasonable, but I’d like some help figuring out how to do this correctly with a tab bar controller.

Thanks.

  • 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-13T06:25:45+00:00Added an answer on June 13, 2026 at 6:25 am

    Just have the one view controller class that knows how to handle your “entities”. Create two instances of the same class, one for each tab. Assign each view controller the appropriate set of entities.

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

Sidebar

Related Questions

I'm designing an application that reads data to the iPod touch/iPhone that is sent
I'm designing an application that'd require different themes. By 'theme' I mean the colors
I'm designing an application that will target android and iphone at the same time.
I'm designing my application data model and I have a doubt, whether to use
I am designing an application, one aspect of which is that it is supposed
I'm designing an application that receives information from roughly 100k sensors that measure time-series
Say you’re designing an application that, by requirement, allows a user the flexibility of
I am designing an application that needs to save geometric shapes in a database.
I'm designing an application that will allow me to draw some functions on a
I am designing an application that will clients on windows, wed, driod, iOS, 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.