0
我得到了另一個類的數組,並且對這個類進行了修改,但是當我做了一個reloadData的時候並沒有多少事情發生。 有什麼不對?UITableView reloadData不會話
這是我的代碼
#pragma mark TesteFaceCarViewController methods
-(void)valores:(NSMutableArray *)array
{
arrayInfracao = array;
NSLog(@"Quantidade :%d", arrayInfracao.count);
[table reloadData];
}
#pragma mark TableView
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
NSLog(@"Passei aqui!");
NSLog(@"Quantidade :%d", arrayInfracao.count);
return arrayInfracao.count;
}
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
Infracao *infracao = [[Infracao alloc] init];
infracao = [arrayInfracao objectAtIndex:indexPath.row];
cell.textLabel.text = infracao.dsInfracao;
return cell;
}
你可以在這裏發佈你的日誌嗎? – demon9733 2012-04-04 18:45:45