取消cell点击色

方法一:

在表格视图服用时使用:

 UIView *backView = [[UIView alloc] initWithFrame:cell.frame];

  cell.selectedBackgroundView = backView;

  cell.selectedBackgroundView.backgroundColor = [UIColor clearColor];

方法二:

在自定义cell中使用

self.selectionStyle = UITableViewCellAccessoryNone;

时间: 2024-08-11 09:56:32

取消cell点击色的相关文章

设置 cell点击 背景色

//设置 cell点击 背景色 cell.selectionStyle = UITableViewCellSelectionStyleDefault; cell.selectedBackgroundView = [[UIView alloc] init]; cell.selectedBackgroundView.backgroundColor = COLOR_RGB(8, 36, 69);

UI-切圆角、透明度、取消按钮点击高亮效果、按钮文字带下划线

一.切UIView的某个角为圆角 如果需要将UIView的4个角全部都为圆角,做法相当简单,只需设置其Layer的cornerRadius属性即可(项目需要使用QuartzCore框架).而若要指定某几个角(小于4)为圆角而别的不变时,怎么做呢? 其实很简单,使用UIBezierPath,设置CAShapeLayer,给UIView设置遮罩效果即可. // 图标左上.左下切圆角 UIBezierPath *phoneIconPath = [UIBezierPath bezierPathWithR

UITableView取消cell选中状态关于deselectRowAtIndexPath

有没有遇到过,导航+UITableView,在push,back回来之后,当前cell仍然是选中的状态. 当然,解决办法简单,添加一句[tableView deselectRowAtIndexPath:indexPath animated:YES]即可. 令人纠结的时,在没加这句的时候,有的视图同样回来之后,选中状态消失,为什么会出现这种情况呢? 原 来是,如果UITableView是在UITableViewController中时,就会默认取消,而如果是在UIViewController时,

iOS UITableViewCell上 取消button点击延迟

这个现象在高亮状态时最为明显 连续触碰button 高亮状态会不显示. 处理方案是关掉scrollView的延迟 代码: 在创建tableView的地方加下面这行 _tableView.delaysContentTouches =NO; 在tableView代理方法 cellForRow 里加入下面代码 for (UIView *currentViewin cell.subviews) { if([currentView isKindOfClass:[UIScrollViewclass]]) {

UITableView中cell点击的绚丽动画效果

本人视频教程系类   iOS中CALayer的使用 效果图: 源码: YouXianMingCell.h 与 YouXianMingCell.m // // YouXianMingCell.h // CellAnimation // // Created by YouXianMing on 14/12/27. // Copyright (c) 2014年 YouXianMing. All rights reserved. // #import <UIKit/UIKit.h> @interfac

CSS冲突1 要关掉的css在项目内:【material-table】 中 checkbox 点击checkbox无法选中or取消,点击旁边才能选中or取消

material table中的checkbox控件,点击框内选不中,点击框外左侧缺能选中,发现是因为css冲突: 发现是因为material table的checkbox实际由两个控件 svg 和 input 组成,svg是方框图片,input才是实际上点击事件的控件.而input的位置因为css冲突偏移了,从而导致点击时间没有发生在框内 使用浏览器检查找到css冲突的具体语句 在项目中全局搜索,找到这个语句所在css,将这句注释掉就可以了 原文地址:https://www.cnblogs.c

取消cell的选中状态,当其选中时

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ [tableView deselectRowAtIndexPath:indexPath animated:YES]; //[self performSegueWithIdentifier:@"toplay" sender:nil]; }

tableviewcell的取消选中,高亮

1.取消多余cell的分割线 UIView *view = [UIView new]; view.backgroundColor = [UIColor clearColor]; [tableView setTableFooterView:view]; 2.取消cell选中状态 代理 didselected - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //

UITableView的编辑

1 #import "RootViewController.h" 2 #import "RootView.h" 3 #define kColor arc4random() % 256 / 255.0 4 @interface RootViewController ()<UITableViewDataSource,UITableViewDelegate> 5 @property (nonatomic, strong) RootView *rootView;