DataArray
変更をデバッグしましたが、UITableView
から取得した新しいデータはまだ表示されませんDataArray
。これは私のコードです:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *CellIdentifier = [NSString stringWithFormat:@"%d,%d",indexPath.section,indexPath.row];
UITableViewCell *cell = [_tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
UILabel *FileNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, 100, 30)];
FileNameLabel.backgroundColor = [UIColor clearColor];
FileNameLabel.font = [UIFont fontWithName:@"Helvetica" size:16];
FileNameLabel.font = [UIFont boldSystemFontOfSize:16];
FileNameLabel.textColor = [UIColor blackColor];
NSLog(@"File Temp 4 array: %@", temp);
FileNameLabel.text =[temp objectAtIndex:indexPath.row];
[cell.contentView addSubview: FileNameLabel];
[FileNameLabel release];
}
return cell;
}
そしてupdate()
機能ViewWillAppear
-(void) update
{
if([FileCompletedArray count] != [temp count])
{
temp = [FileCompletedArray mutableCopy];
NSLog(@"File Temp 1 array: %@", temp);
[_tableView reloadData];
NSLog(@"File Temp 2 array: %@", temp);
}
}
解決策はありますか?