您的位置:首页 > Web前端 > CSS

iOS tableView 设置选中type样式

2016-08-30 10:03 471 查看
</pre><pre name="code" class="objc">可以给checkmark添加颜色、cell.tintColor = [UIColo redColor];
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (![indexPath isEqual:_lastIndex]) {
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
cell.accessoryType = UITableViewCellAccessoryCheckmark;

UITableViewCell *lastCell = [tableView cellForRowAtIndexPath:_lastIndex];
lastCell.accessoryType = UITableViewCellAccessoryNone;
_lastIndex = indexPath;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: