Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>What you asking is not clear?Be clear for next time.For your the fallowing one is one of the solution.</p> <p>Try the fallowing example</p> <p>This is my FirstViewController.h</p> <pre><code>#import &lt;UIKit/UIKit.h&gt; #import "SecondViewController.h" @interface FirstViewController : UIViewController { NSArray *first_Array; } -(IBAction)nextViewController:(id)sender; @end This is my FirstViewController.m .Call nextViewcontroller method with a button #import "ViewController.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; first_Array=[[NSArray alloc] initWithObjects:@"one",@"two",@"three",@"four",@"five",@"six",@"seven",@"eight",@"nine",@"ten", nil]; } -(IBAction)nextViewController:(id)sender { SecondViewController *obj=[[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil]; [self.navigationController pushViewController:obj animated:YES]; [obj receivingArrayFromFirstViewController:first_Array]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } @end This is my SecondViewController.h #import &lt;UIKit/UIKit.h&gt; @interface SecondViewController : UIViewController { } -(void)receivingArrayFromFirstViewController:(NSArray*)array; @end This is my SecondViewController.m #import "SecondViewController.h" @interface SecondViewController () @end @implementation SecondViewController - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization } return self; } - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view from its nib. } -(void)receivingArrayFromFirstViewController:(NSArray*)array { NSMutableArray *arr=[NSMutableArray arrayWithArray:array]; NSLog(@"The received array %@",arr); } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } @end </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload