设置cell选中颜色以及表格默认选中某行
来源:互联网 发布:c语言输出 编辑:程序博客网 时间:2024/05/18 00:10
1.在加载cell的地方(即 (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath里面)加上下面几句代码
[cell setBackgroundColor:CLEARCOLOR];
cell.selectedBackgroundView = [[UIViewalloc] initWithFrame:cell.frame];
cell.selectedBackgroundView.backgroundColor =COLOR(255,255, 255, 1.0);
//设置选中第一行
[self.tableView selectRowAtIndexPath:[NSIndexPathindexPathForItem:0inSection:0]animated:YESscrollPosition:UITableViewScrollPositionTop];
if ([self.tableView.delegaterespondsToSelector:@selector(tableView:didSelectRowAtIndexPath:)])
{
[self.tableView.delegatetableView:self.tableView didSelectRowAtIndexPath:[NSIndexPathindexPathForItem:0inSection:0]];
}
- 设置cell选中颜色以及表格默认选中某行
- 设置cell选中颜色以及表格默认选中某行
- ios tableView设置cell选中颜色以及表格默认选中某行
- iOS中 cell的选中颜色以及默认选中行
- 设置cell默认选中
- ios 设置UITableView 选中行cell的背景颜色(自定义选中的背景颜色)
- extjs6 表格行选中时去掉默认背景颜色
- XtraGrid GridView设置默认选中的行颜色
- iOS UITableView 设置默认选中行及其颜色
- wpf datagrid 样式怎么设置默认选中行的颜色
- 两行代码自定义cell选中颜色
- 表视图默认选中第一个cell以及button外沿特性设置
- 表视图默认选中第一个cell以及button外沿特性设置
- Android 动态设置RadioButton选中和没选中的颜色及设置默认选中某一项
- 选中cell后不变颜色
- UiTableView 默认选中一个cell
- UITableView默认选中一个Cell
- 设置cell选中后一段时间颜色自动消失
- MyEclipse2014使用技巧--持续更新
- 采用CSS3设计的登录界面,动态效果(动画)
- 每个Java开发者都应该知道的5个JDK工具
- SolrCloud 与 Collection 的管理
- android listview去除拉至顶部或底部时的蓝色
- 设置cell选中颜色以及表格默认选中某行
- Terminal和Vim在Mac os和Linux系统下Solarized的配色配置
- ARC转非ARC
- java
- What to do if you've deleted a file (or multiple files)
- Xshell不能按退格、删除键和中文乱码的解决方案
- C# MVC框架(2)---快速入门
- 新浪微博分享 (获取用户授权时出现 error :redirect_uri_mismatch 的问题)
- OC-KVO