//长按是否出现编辑菜单(Cut Copy Paste)- (BOOL)collectionView:(UICollectionView *)collectionView shouldShowMenuForItemAtIndexPath:(NSIndexPath *)indexPath{ retu....
分类:
移动开发 时间:
2015-10-16 16:52:35
阅读次数:
756
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {// 列宽CGFloat contentWidth = self.tableView.frame.size....
分类:
其他好文 时间:
2015-10-13 21:02:22
阅读次数:
251
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath这个代理方法的实现,在可见的页面是会重复绘制页面的,所以绝大部分人都会在这里做一些代码处理比如:...
分类:
其他好文 时间:
2015-10-10 17:04:10
阅读次数:
473
列表的单元格中包含有图片在开发中很常见。通常我们可以直接在tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath)中给单元格设置图片。但有时这些图片要从远程加载,或者要给图片作裁减,添加滤镜等操作。...
分类:
编程语言 时间:
2015-10-07 12:05:18
阅读次数:
331
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ // 声明静态字符串型对象,用来标记重用单元格 static NSString *str...
分类:
其他好文 时间:
2015-10-06 10:17:16
阅读次数:
118
-(NSArray*)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath{ UITableViewRowAction *rowAction = [UITableView...
分类:
移动开发 时间:
2015-09-26 06:56:37
阅读次数:
235
}else if (indexPath.row == 2){ UITableViewCell *cell2 = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"cell2"]...
分类:
其他好文 时间:
2015-09-24 21:13:25
阅读次数:
162
UITableViewDelegate协议方法
返回每一行单元格的高度
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
返回分区区头的高度
- (CGFloat)tableView:(UITableView *)tableView h...
分类:
移动开发 时间:
2015-09-24 14:45:44
阅读次数:
196
主要是通过cell.accessoryView来添加switch控件- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {static NSStr...
分类:
其他好文 时间:
2015-09-18 15:30:13
阅读次数:
143
一、.重用cell 在数据源方法中,在可见的页面重复绘制OC方法中- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;SWIFT方法overri....
分类:
移动开发 时间:
2015-09-18 01:57:35
阅读次数:
237