ios cell多选
2016-03-13 21:24
190 查看
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath
*)indexPath
{
NSArray *value = [selectValueDictionaryallKeys];
if ([valuecontainsObject:inv.uuid])
{
cell.accessoryType =UITableViewCellAccessoryCheckmark;
}else
{
cell.accessoryType =UITableViewCellAccessoryNone;
}
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [self.tableView
cellForRowAtIndexPath: indexPath ];
if (cell.accessoryType ==UITableViewCellAccessoryNone){
cell.accessoryType =UITableViewCellAccessoryCheckmark;
[selectValueDictionary
setObject:indexPath forKey:[jobWelfareArrayobjectAtIndex:indexPath.row]];
}
else{
[selectValueDictionaryremoveObjectForKey:[jobWelfareArrayobjectAtIndex:indexPath.row]];
cell.accessoryType =UITableViewCellAccessoryNone;
}
[self.tableViewdeselectRowAtIndexPath:indexPathanimated:YES];
}
*)indexPath
{
NSArray *value = [selectValueDictionaryallKeys];
if ([valuecontainsObject:inv.uuid])
{
cell.accessoryType =UITableViewCellAccessoryCheckmark;
}else
{
cell.accessoryType =UITableViewCellAccessoryNone;
}
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [self.tableView
cellForRowAtIndexPath: indexPath ];
if (cell.accessoryType ==UITableViewCellAccessoryNone){
cell.accessoryType =UITableViewCellAccessoryCheckmark;
[selectValueDictionary
setObject:indexPath forKey:[jobWelfareArrayobjectAtIndex:indexPath.row]];
}
else{
[selectValueDictionaryremoveObjectForKey:[jobWelfareArrayobjectAtIndex:indexPath.row]];
cell.accessoryType =UITableViewCellAccessoryNone;
}
[self.tableViewdeselectRowAtIndexPath:indexPathanimated:YES];
}
相关文章推荐
- ios tableview单选
- iOS开发-进阶:JPush设置标签与别名的API
- iOS开发-进阶:开启Remote notifications
- iOS9 新特征之一:Bitcode
- iOS 学习路线整理(根据学习的深入,需要持续整理)
- iOS视频播放器
- iOS关灯游戏AI的设计和实现
- iOS基础开发练习 国际棋盘 的设计
- iOS之NSDictionary和NSArray以及NSMutableDictionary和NSMutableArray:将不再是问题
- iOS 消息推送
- 支付宝 iOS SDK 的简单使用
- OC基础
- iOS YYText的使用笔记二(YYLabel聊天表情+文字并排)
- iOS 页面传值方式 单例,block,代理协议方法,通知中心
- iOS YYText的使用笔记一(YYTextView图文编辑器)
- 解决iOS打印数组和字典中文显示异常问题
- IOS中如何切换到主线程工作
- iOS的NSString和NSDate之间的转换
- iOS开发推送小结
- iOS 单元测试之XCTest详解(一)