How to highlight a row in a UITableView

前端 未结 6 1154
名媛妹妹
名媛妹妹 2020-12-31 10:00

The code below seems to have no effect. I want it to be highlighed in the same way it highlights when you tap on a row

- (UITableViewCell *)tableView:(UITab         


        
6条回答
  •  没有蜡笔的小新
    2020-12-31 10:36

    You can use 

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
    {
       ...
       [cell.textLabel setHighlighted:YES];
    
    
       return cell;
    }
    

提交回复
热议问题