我在cellForRowAtIndexPath方法中正确设置UITableViewCell的selectedBackgroundView时遇到一些困难。我尝试了一些代码变体...CGRectcustomFrame=CGRectMake(cell.frame.origin.x+1.0f,cell.frame.origin.y,cell.frame.size.width-22.0f,cell.frame.size.height);UIView*cellBackground=[[[UIViewalloc]initWithFrame:customFrame]autorelease];cellB