-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{//参考资料:http://beyondvince...
分类:
其他好文 时间:
2015-11-09 12:35:15
阅读次数:
197
//指定刷新某一行 NSIndexPath *indexPath=[NSIndexPath indexPathForRow:0 inSection:1]; [_readTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPa...
分类:
其他好文 时间:
2015-11-06 09:37:46
阅读次数:
89
//当一个cell进入到视野范围内就会调用- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{//// 1.创建cell// UITa...
分类:
其他好文 时间:
2015-11-05 23:49:36
阅读次数:
278
- (void)buttonClickedWith:(UIButton *)button event:(UIEvent *)event{ NSSet *touches =[event allTouches]; UITouch *touch =[touches anyObject]; ...
分类:
其他好文 时间:
2015-10-30 10:37:03
阅读次数:
204
采用存取indexPath的方式,来对多个选中的单元格进行删除删除前: 删除后: 分析:如何实现删除多个单元格呢?这需要用到UITableView的代理方法,即选中单元格时对单元格做的处理,同时我们也要定义一个可变的数组,用来存储选中的数据,以便后来...
分类:
移动开发 时间:
2015-10-28 01:23:59
阅读次数:
220
iOS开发拓展篇—音频处理(音乐播放器3)说明:这篇文章主要介绍音频工具类和播放工具类的封装。一、控制器间数据传递1.两个控制器之间数据的传递第一种方法:self.parentViewController.music=self.music[indexPath.row];不能满足第二种做法:把整个数组...
分类:
移动开发 时间:
2015-10-27 19:45:21
阅读次数:
352
1、[tableView dequeueReusableCellWithIdentifier:reuseIdentifier]和[tableView dequeueReusableCellWithIdentifier:reuseIdentifier forIndexPath:indexPath]区别...
分类:
其他好文 时间:
2015-10-27 17:23:40
阅读次数:
114
类名转换成字符串NSClassFromString(@"class")字符串转换成类NSStringFromClass([self class]);实例id VC = [[NSClassFromString([self.sourceArray objectAtIndex:indexPath.row]...
分类:
其他好文 时间:
2015-10-27 17:00:14
阅读次数:
105
在UITableView或UICollectionView的自定义cell中创建一button,在点击该按钮时知道该按钮所在的cell在UITableView或UICollectionView中的行数。就是cell的 indexPath.row,下面以UITableView为例: 有两种方法:-.....
分类:
移动开发 时间:
2015-10-21 22:26:28
阅读次数:
218
要实现在表格里编辑文本, 表格让我想到了CollectionView,文本让我想起TextView, 做之前想了好久怎么样来获得编辑的是哪个TextView,要获取对应的IndexPath啊,想着之前Cell中的按钮用block来实现,在自定义的Cell中加一个属性存IndexPath,可想着就一个...
分类:
移动开发 时间:
2015-10-20 17:48:06
阅读次数:
221