2012-04-04 80 views
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; 
} 
+0

你可以在这里发布你的日志吗? – demon9733 2012-04-04 18:45:45

回答

0

欢迎您!

[self.table reloadData];