CJ F
CJ F

Reputation: 835

NSMutableArray Not Being Set

I'm trying to do some simple assignment, but coming up with different results and I can't figure out why. Why does the first assignment below work and the second one not?

NSMutableArray *mutableFetchResults = something approrpriate here;
[self  setLocationsArray:mutableFetchResults];
[switchViewController setLocationsArray:mutableFetchResults];

NSLog(@"1 - %@", self.locationsArray); // -> returns array
NSLog(@"2 - %@", switchViewController.locationsArray); // -> returns null
NSLog(@"3 - %@", mutableFetchResults); // -> returns array

Upvotes: 0

Views: 55

Answers (1)

Thomas Clayson
Thomas Clayson

Reputation: 29935

I bet switchViewController is nil.

Upvotes: 3

Related Questions