2012-04-04 4 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

ответ

 Смежные вопросы

  • Нет связанных вопросов^_^