2012-03-29 83 views

回答

0

尝试将此....

- (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] autorelease]; 
    } 
    cell.backgroundColor = [UIColor clearColor]; // clear the cell background color 

    // Configure the cell. 

    return cell; 
} 
0

您可以使用下面的代码

1)cell.selectionStyle = UITableViewCellSelectionStyleRed;

OR

2)细胞= [[[ALLOC的UITableViewCell] initWithFrame:方法CGRectZero reuseIdentifier:CellIdentifier]自动释放];

UIView *selectionColor = [[UIView alloc] init]; 
selectionColor.backgroundColor = [UIColor colorWithRed:(245/255.0) green:(245/255.0) blue:(245/255.0) alpha:1]; 
cell.selectedBackgroundView = selectionColor; 

使用任何的上面的代码将解决你的问题,如果你仍然问题没有解决把你的代码,我会尽力解决