@implementation RightViewController{
NSMutableArray * tableArray;
}
@synthesize tableView;
- (void)viewDidLoad {
[super viewDidLoad];
tableArray = [[NSMutableArray alloc] init];
}
- (void)refreshTable: (NSMutableArray*)resultsArray{
[tableArray setArray:resultsArray];
NSLog(@"resultsArray : %d : %d", [tableArray count] , [resultsArray count]);
[self.tableView reloadData];
}
It shows me : resultsArray : 0 : 78
Why can't I set information to this array? I do call refreshTable from another controller like this:
[[[RightViewController alloc] init] refreshTable:resultsArray];
Updated:
tableArray = [NSMutableArray arrayWithArray:resultsArray];
worked for me.
After that i do
- (IBAction)reloadTableButton:(id)sender {
[self refreshTable:tableArray];
}
and it's shows me : resultsArray : 0 : 0
Why is tableArray array empty?
tableViewdata source is baked by said array.