//数据源协议中有两个方法,在cell被选中或取消时被触发 //didSelect,当你选中某个cell时,就会调用该方法. -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ } //d...
分类:
其他好文 时间:
2014-12-15 19:11:55
阅读次数:
126
NSIndexSet-入门浅析记得上一次,用到,关于删除UITableView分组的方法[tableViewdeleteSections:[NSIndexSetindexSetWithIndex:indexPath.section]withRowAnimation:UITableViewRowAni...
分类:
其他好文 时间:
2014-12-12 16:30:10
阅读次数:
239
- (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ // 取消前一个选中的,就是单选啦 NSIndexPath *lastIndex = [NS...
分类:
其他好文 时间:
2014-12-11 18:53:43
阅读次数:
141
一、UITableView的属性NSIndexPath类型是用来获取用户选择的indexPath,在别的函数里面,若需要知道用户选择了哪个cell,用上它可以省事很多。不必再去建全局变量section和row。NSIndexPath *tableSelection = [self.tableView...
分类:
其他好文 时间:
2014-12-11 10:02:16
阅读次数:
202
多选做法如下:
- (void)tableView:(UITableView *)tableViewdidSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableViewdeselectRowAtIndexPath:indexPath animated:YES];
Custom *cell= (Custom*...
分类:
移动开发 时间:
2014-12-10 16:17:13
阅读次数:
216
//1.设置可以编辑- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{ return YES;}- (UITableViewCellEditingStyle)tableV...
分类:
其他好文 时间:
2014-12-08 21:17:25
阅读次数:
136
alertView可以标记自己textView的index,通过index调用。- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ [tableView desel....
分类:
其他好文 时间:
2014-12-05 17:06:10
阅读次数:
199
如果tableView返回多个section,每个section中只有1个row,则在[_diaryTableView reloadData]后,加上
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:_contents.count - 1];
if (indexPath.section < [...
分类:
移动开发 时间:
2014-12-04 18:08:49
阅读次数:
257
创建索引库 //读取文件,存储到索引库 public string CreateDatebase() { //获取索引库的路径 var indexPath = AppDomain.CurrentDomain.BaseDirectory + Configurat...
分类:
Web程序 时间:
2014-12-02 19:08:19
阅读次数:
187
UITableViewScrollPosition:- (void)scrollToRowAtIndexPath:(NSIndexPath *)indexPath atScrollPosition (UITableViewScrollPosition)scrollPosition animated:...
分类:
其他好文 时间:
2014-11-30 21:25:21
阅读次数:
258