如图所示, 当点击字母H时, 改变他的颜色, 我没找到这个方法, 请教一下怎么处理
闭关修行中......
(UITableViewCell )tableView:(UITableView )tv cellForRowAtIndexPath:(NSIndexPath *)indexPath {
for(UIView *view in [tv subviews]) {
if([[[view class] description] isEqualToString:@"UITableViewIndex"]) { [view setBackgroundColor:[UIColor whiteColor]]; [view setFont:[UIFont systemFontOfSize:14]]; }
}
//rest of cellForRow handling...
}The system does not provide a method. We can traverse the subview to find it and modify it in the return cell agentAnt-Bang mutual aid community (Q group 426981364) will answer for you
(UITableViewCell )tableView:(UITableView )tv cellForRowAtIndexPath:(NSIndexPath *)indexPath {
for(UIView *view in [tv subviews])
{
}
//rest of cellForRow handling...
}
The system does not provide a method. We can traverse the subview to find it and modify it in the return cell agent
Ant-Bang mutual aid community (Q group 426981364) will answer for you