2012-04-04 13 views
0

私は別のクラスの配列を取得し、このクラスに変更を加えますが、reloadDataを実行するとあまり発生しません。 どうしたのですか?UITableView reloadData don`t word

これは、あなたは歓迎されている私のコード

#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; 
} 
+0

ここにログを掲載できますか? – demon9733

答えて

0

です!

[self.table reloadData];

関連する問題