虽然UITableView和UICollectionView都有cell复用机制,但是如果利用SDWebImage加载的图片本身过大且cell复用池中的个数比较多(cell的Size越小,复用池中的cell就越多), 就容易收到内存溢出的警告!控制台会打印:Received memory warni ...
分类:
移动开发 时间:
2016-07-19 17:02:26
阅读次数:
617
#pragma mark--headView -(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { if (section == 0) { return 50; }else ...
分类:
其他好文 时间:
2016-07-16 20:02:33
阅读次数:
250
//去掉UItableview headerview黏性(sticky) 去掉header的浮动效果 - (void)scrollViewDidScroll:(UIScrollView *)scrollView { if (scrollView == self.tableView) { CGFloa ...
分类:
其他好文 时间:
2016-07-15 17:15:25
阅读次数:
153
// 实现滑动删除 // 什么时候调用 - (void)tableView:(UITableView*)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexP ...
分类:
其他好文 时间:
2016-07-14 13:19:08
阅读次数:
117
http://blog.csdn.net/ouyangtianhan/article/details/7835041 http://stackoverflow.com/questions/16071503/how-to-tell-when-uitableview-has-completed-relo ...
分类:
其他好文 时间:
2016-07-12 19:11:10
阅读次数:
143
http://blog.csdn.net/kingsley_cxz/article/details/9123959 1.UITableView的datasource实现: //回调获取每个section中的cell的行数- (NSInteger)tableView:(UITableView *)ta ...
分类:
其他好文 时间:
2016-07-12 17:20:20
阅读次数:
144
利用NSMutableDictionary key值 来改变cell的状态 -(void)createUI{ table = [[UITableView alloc]initWithFrame:CGRectMake(0, 100, [UIScreen mainScreen].bounds.size. ...
分类:
其他好文 时间:
2016-07-11 19:08:06
阅读次数:
111
// RootViewController.m #import "RootViewController.h"#import "NextViewController.h"@interface RootViewController (){ NSMutableArray * dataSource;//数据 ...
分类:
其他好文 时间:
2016-07-11 19:04:24
阅读次数:
104
使用不透明视图。不透明的视图可以极大地提高渲染的速度。因此如非必要,可以将table cell及其子视图的opaque属性设为YES(默认值)。其中的特例包括背景色,它的alpha值应该为1(例如不要使用clearColor);图像的alpha值也应该为1,或者在画图时设为不透明。 不要重复创建不必 ...
分类:
其他好文 时间:
2016-07-10 21:26:57
阅读次数:
150