扫码关注官方订阅号
认证高级PHP讲师
可以自定义UITableViewCell,重写setHighlighted和setSelected俩个方法,在这里根据当前状态,设置bgView或者是contentView得颜色属性
你既然希望看不出来为什么不关闭选中的动画效果。有一个属性在- (void)tableView:(UITableView )tableView didSelectRowAtIndexPath:(NSIndexPath )indexPath {
//some functions ...... // 取消选中状态 [tableView deselectRowAtIndexPath:indexPath animated:NO];
}
cell.selectedBackgroundView = yourView;你可以对yourView做自定义以实现你的效果
cell.selectedBackgroundView = yourView;
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
可以自定义UITableViewCell,重写setHighlighted和setSelected俩个方法,在这里根据当前状态,设置bgView或者是contentView得颜色属性
你既然希望看不出来为什么不关闭选中的动画效果。有一个属性在- (void)tableView:(UITableView )tableView didSelectRowAtIndexPath:(NSIndexPath )indexPath
{
}
cell.selectedBackgroundView = yourView;你可以对yourView做自定义以实现你的效果