i\'m having a hard time with Xcode; for some reason, it just won\'t let me pass a variable from one view controller class to another. It should work, i was basically just co
Follow these simple steps please, it should work.
In your SecondViewController:
Create an initializer in the second View Controller. Ex:
-(id)initWithResultsArray: (NSArray *) resultsArray
;
Create a variable for holding the array. Say myResultsArray
.
Inside the initWithResultsArray
method, save the value of resultsArray
to myResultsArray
.
Initialize the SecondViewController
using initWithResultsArray
instead of just init
.
Present your controller as usual, you will be able to work with myResultsArray
.
Hope this helps.
Monica ツ