实现效果如下: 以前做这效果的界面,总是实现的是section的头视图,因为我一直觉得collectionView是不像UITableView那样有tableHeaderView的,所以每次实现只能是判断indexpath.section为0的时候,组合一下视图做第一个section的头视图. 今天 ...
分类:
其他好文 时间:
2016-10-24 13:20:44
阅读次数:
275
出现这个这个错误, 有可能是由于你直接通过一个数组的索引获取一个对象(或模型)然后直接调用这个对象(或模型)的某个方法 例如: NSString *status = [self.models[indexPath.row] status]; 应该改为: RPModel *model = self.mo ...
分类:
其他好文 时间:
2016-09-24 17:27:29
阅读次数:
197
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; 删除行 -(void)tableView:(UITabl ...
分类:
其他好文 时间:
2016-09-01 10:33:06
阅读次数:
184
uicollectionview最大的特点就是它的数据源方法(cell for indexpath)里只需要从缓存池中重用即可,即调用deque...for indexPath..(这里有个坑,注意tableview里重用时并不需要后面红色的indexpath部分,如果你在tableview里用这个 ...
分类:
其他好文 时间:
2016-08-24 00:57:22
阅读次数:
179
主要实现这个方法就好了 -(NSArray<UITableViewRowAction *> *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath{ return @[ [U ...
分类:
移动开发 时间:
2016-08-23 13:19:09
阅读次数:
221
- (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath { //删除按钮 UITableViewRowAction *deleteRowAction = ...
分类:
其他好文 时间:
2016-08-16 14:38:02
阅读次数:
124
iOS开发拓展篇—音频处理(音乐播放器3) 说明:这篇文章主要介绍音频工具类和播放工具类的封装。 一、控制器间数据传递 1.两个控制器之间数据的传递 第一种方法:self.parentViewController.music=self.music[indexPath.row];不能满足 第二种做法: ...
分类:
移动开发 时间:
2016-08-14 16:14:29
阅读次数:
253
ios uitableview button 获取cell indexpath.row ...
分类:
移动开发 时间:
2016-08-05 19:26:54
阅读次数:
247
//允许cell可以进行编辑 - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{ return YES; } //cell的编辑类型 - (UITableViewCell ...
分类:
其他好文 时间:
2016-08-01 12:05:55
阅读次数:
152
-(void)collectionView:(UICollectionView *)collectionView didDeselectItemAtIndexPath:(NSIndexPath *)indexPath - (void)collectionView:(UICollectionView ...
分类:
其他好文 时间:
2016-07-31 21:55:39
阅读次数:
489