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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:57:15+00:00 2026-05-25T01:57:15+00:00

I have NSMutable Array in FirstviewController. I want to copy objects of that array

  • 0

I have NSMutable Array in FirstviewController. I want to copy objects of that array to another NSMUtable Array which is in SecondViewController.
But FirstViewController and SecondViewController are in different tabs (my app’s rootController is a tabBarController )

Note: I know It’s work for [self.navigationController pushViewController:firstViewController animated:YES];
But, how can I do it when viewControllers are in different tabs like in my case.

please give me a help. thanks in advanced.

  • 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-25T01:57:16+00:00Added an answer on May 25, 2026 at 1:57 am

    There are a few ways to do this type of pattern:

    1. Delegation. This is where you would make one view controller know of the other by passing a pointer to it. So you create controller 1 first somewhere, then after controller 1 is created, you tell controller 2 about the controller 1 so that controller 2 can access controller 1’s public instance variables
    2. Notifications. You can send object through a notification system that you would register to listen to. Here controller 2 would listen for a certain notifications that controller 1 would send when you need it to.
    3. Global variables. This is where you store the array abject not in each view controller, but in a global place accessible to all such as the App Delegate or the root view controller.

    There are more design patterns, but these are your best bet for this type of setup. For more info on these, check the Cocoa Fundamentals Guide provided by Apple

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

Sidebar

Related Questions

I want to store my CGPoint to the NSMutable Array, so , I have
I have a UITableView that is being populated from an NSMutable array that has
I have an array randomAlphabets which contains CCSprite objects. I need to start animation
I have an array randomAlphabets which contains CCSprite objects. I need to start animation
Newbie question. I have a NSMutableArray that holds multiple objects (objects that stores Bezier
I have two view controllers name RootViewController and SecondViewController. In the FirstViewController I have
I have used NSMutable Dictionary and NSMutable Array. The datas are to be stored
I have used NSMutable Dictionary and NSMutable Array. The datas are to be stored
I have an NSMutableArray in my class containing Ingredient objects. I want to check
I have an NSMutableArray of NSStrings , which I want to write to a

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.