@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];
}
這表明我:resultsArray:0:78設置的NSMutableArray新的NSMutableArray
爲什麼我不能設置信息這陣? 我這樣從另一個控制器調用refreshTable:
[[[RightViewController alloc] init] refreshTable:resultsArray];
更新時間:
tableArray = [NSMutableArray arrayWithArray:resultsArray];
爲我工作。
後,我做的
- (IBAction)reloadTableButton:(id)sender {
[self refreshTable:tableArray];
}
,它的顯示我:resultsArray:0:0
爲什麼tableArray數組是空的?
[Rü特林像tablearray = resultsArray –
@yulz%d是INT –
你確定你的resultsArray不爲零或者沒有項目? –