2013-06-21 3 views

답변

2

UITableViewCell.SelectionStyle 속성을 재정의하면 UITableViewCellSelectionStyle 값 (None 포함)을 반환 할 수 있습니다.

1

새 셀을 만들 때마다 cell.selectionStyle = UITableViewCellSelectionStyleNone을 설정하십시오.

-(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]; 
     cell.selectionStyle = UITableViewCellSelectionStyleNone; 
    } 

return cell; 
} 
관련 문제