cell.accessoryType不显示
来源:互联网 发布:淘宝国际转运 编辑:程序博客网 时间:2024/05/17 01:00
自定义一个tableview cell的xib文件;
然后使用tableview 本来想在选中显示勾的,发现根本不显示
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
cell.accessoryType = UITableViewCellAccessoryCheckmark;
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
后来直接把这句 放这里面 还是不显示
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
NSString *cellIndetifier = @"SimpleTableCell";
SimpleTableCell *cell = (SimpleTableCell *) [tableView dequeueReusableCellWithIdentifier:cellIndetifier];
if(cell== nil)
{
NSArray *nib = [[NSBundle mainBundle]loadNibNamed:@"SimpleTableCell" owner:self options:nil];
cell = [nib objectAtIndex:0];
}
cell.nameLabel.text= [tableData objectAtIndex:indexPath.row];
cell.accessoryType = UITableViewCellAccessoryCheckmark;
return cell;
}
求懂的 指导下 谢谢啦
然后使用tableview 本来想在选中显示勾的,发现根本不显示
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
cell.accessoryType = UITableViewCellAccessoryCheckmark;
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
后来直接把这句 放这里面 还是不显示
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
NSString *cellIndetifier = @"SimpleTableCell";
SimpleTableCell *cell = (SimpleTableCell *) [tableView dequeueReusableCellWithIdentifier:cellIndetifier];
if(cell== nil)
{
NSArray *nib = [[NSBundle mainBundle]loadNibNamed:@"SimpleTableCell" owner:self options:nil];
cell = [nib objectAtIndex:0];
}
cell.nameLabel.text= [tableData objectAtIndex:indexPath.row];
cell.accessoryType = UITableViewCellAccessoryCheckmark;
return cell;
}
求懂的 指导下 谢谢啦
0 0
- cell.accessoryType不显示
- cell.accessoryType不显示
- IOS--错误集锦--cell.accessoryType不显示内容
- iOS7 设置cell.accessoryType显示的颜色
- cell.accessoryType
- iOS UITableView cell accessoryType single checkmark
- cell的detailLabel不显示
- ios static cell 不显示
- iOS修行---TableView进阶2之cell.accessoryType
- TableView不显示没内容的Cell
- storyboard xib 自定义cell 模拟器不显示。
- UITableViewCell中cell分割线不显示
- iOS swift 自定义tableView不显示cell
- iOS - 设置cell显示还是不显示机制
- iOS开发- TableView不显示没内容的Cell
- iOS开发- TableView不显示没内容的Cell
- iOS开发- TableView不显示没内容的Cell
- UITableView 的 cell显示不完整的问题
- 爬楼梯
- 4、栈
- 【凡凡说项目】怎么对待接手原有项目代码时的心力交瘁
- android fragment 中请求网络最好写在那个生命周期中
- 请问visualsvn怎么才能让.so文件上传到服务器上去,急急急急
- cell.accessoryType不显示
- 《汇编语言(第3版)》王爽 课程设计2
- Ubuntu之源相关知识与操作指令
- ImageView 绘制圆角效果_Xfermode
- session、cookie和cache的区别
- 多态与向上塑性
- java中length,length(),size()区别
- Android 判断wifi是哪种设备发出?
- spring源码学习 - 配置文件bean的初始化