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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:10:44+00:00 2026-05-15T18:10:44+00:00

I am writing the iPhone application and I would like to ask about the

  • 0

I am writing the iPhone application and I would like to ask about the the passing parameters in Objective-C.

I create 2 view controller. In the first one, I have a button, when a user press the button, it will call the -(IBAction) pressButton (user-defined), and after 5-6 second (have to process and retrieve the data in the NSMutableArray *), it will display a table. However, I don’t know how to pass the NSMutableArray to the table class. Can I do this?

// situation
// ---------------------------------------------
// In MyViewController.m

// class variable
NSMutableArray * arr;
- (IBAction) pressButton: (id)sender {...}
// I retrieve the data and store in the arr

// In TableView.m
// I want to pass the arr to here and use

I know how to create the table, but I don’t know how to pass the parameters from a class (MyViewController.m) to another class (TableView.m).

  • 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-15T18:10:45+00:00Added an answer on May 15, 2026 at 6:10 pm

    In your TableView ViewController create NSMutableArray like this

    IBOutlet NSMutableArray  *PassedArray;
    @property(nonatomic,retain) NSMutableArray  *PassedArray;
    @synthesize PassedArray;
    [PassedArray release];
    

    Now you can pass NSMutableArray value from your Myviewcontroller to tableviewcontroller using this

    tableviewcontroller *objInstance = [[tableviewcontroller alloc]initWithNibName:@"tableviewcontroller" bundle:nil];
    objInstance.PassedArray = NSMutableArray;//Here you declare your passed NSMutableArray
    [self.navigationController pushViewController:objInstance animated:YES];
    [objInstance release];
    

    Another method is Declare NSMutableArray *yourArray is global in MyViewController.h and extern those variables in tableviewcontroller.m like this

    extern NSMutableArray *yourArray;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to ask a question about the iPhone application. I am writing a
I am writing a string tokenizer in Objective-C for an iPhone application . I
I am writing an iPhone application and I have a table view that is
I am writing an iPhone application that contains a tab controller, each tab item
I am writing an iPhone application in Objective-C that utilizes some custom drawing in
I am working on an iPhone application and would really like to determine if
I am writing an iPhone application. In one of my views the user will
I'm writing a Rhomobile application targeted at iPhone and Android. I need to create
I am writing an iPhone application, and need to save the state of my
I'm currently writing an iPhone application that uses a UITabBarController with more than 5

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.