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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:47:27+00:00 2026-06-17T15:47:27+00:00

Hi in VC1 I have an NSMutableArray displaying results. I want to keep that

  • 0

Hi in VC1 I have an NSMutableArray displaying results. I want to keep that array alive even when users clicks to a different tab (so they don’t have to search again) until the user searches again.

I have a strong pointer to it, but it seems to unload when I leave the view.

Not much code to show (_resultsArray is set from a previous controller using delegates, so it loads with the results already)

    - (void)viewDidLoad
    {
        [super viewDidLoad];
        _resultsTableView.dataSource=self;
        _resultsTableView.delegate=self;
        [self.navigationController.navigationBar setHidden:YES];
    }
//then standard tableview delegate methods...

This code is to try to figure out how to segue tab bar to share info.
(in prepareforsegue)

Currently in Search VC. Now I have results I want to give to resultsIndexVC. The code below attempts this.
This is placed in current (search VC) prepare for segue.

ResultsIndexViewController* vc = [[ResultsIndexViewController alloc] init];
        UITabBarController* tbc = [segue destinationViewController];
        vc = (ResultsIndexViewController *)[[tbc customizableViewControllers] objectAtIndex:1];
        vc.SearchDelegate=self;//crash here (normally works if using regular segue)
        vc.resultsArray = _temporaryResultsArray;
        vc.originalQuery=_queryArray;

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-17T15:47:28+00:00Added an answer on June 17, 2026 at 3:47 pm

    Issue is that I was pushing a VC. Instead I used the tabbar (which doesnt release the object when switching tabs)

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

Sidebar

Related Questions

I have following view controllers hierarchy: View Controller VC1 Tab Bar Controller TBC1 -
I have an application that uses a UITabBar when my app loads VC1 loads
I have vc1.view covering the whole screen, and I want to be able to
My data is just number, I want pass it from VC1 to VC2 for
I have a UINavigationController with a UIViewController (vc1) as the root view controller. There
I want to initialize my tab bar controller programmatically, but I just get a
I've got a view controller, call it VC1, that's a table view. When I
I have 2 view controllers, vc1 and vc2. A modal segue is invoked from
I have this small script that shows a caption for a img when it
I have a custom container UIViewController that has six child UIViewControllers, and a set

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.