实现代码: -?(NSArray?*)tableView:(UITableView?*)tableView?editActionsForRowAtIndexPath:(NSIndexPath?*)indexPath
{
????UITableViewRowAction?*editAction?=?[UITableViewRowAction?rowActi...
分类:
其他好文 时间:
2015-08-20 13:25:11
阅读次数:
103
选中tableView的某一行,触发如下方法:
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
*)indexPath
{
}
若此时需要对tableview的cell做处理,就需要先得到改行cell对应的实例,可运用如下方法:
UITableViewC...
分类:
移动开发 时间:
2015-08-13 22:16:26
阅读次数:
400
效果图常见问题及解决方法
图片重复下载
将内存保存在内存或沙盒中。
若下载的图片量较大,则会出现UI界面不流畅的现象
在子线程中执行下载操作,然后回到主线程成中进行UI界面的刷新。
由于cell的循环利用造成的图片显示错乱问题
指定刷新表格的indexPath行。
subTitle类型的cell,无法显示图片
subtitle类型的cell中的imageView只有在第一次返回cell时设置...
分类:
移动开发 时间:
2015-08-09 12:40:53
阅读次数:
126
1.Push跳转- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *cellKey=@"cellKey...
分类:
其他好文 时间:
2015-08-06 21:47:22
阅读次数:
99
通过Identifier标记不同的Cell,实现不同Cell的重用:- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ if (index...
分类:
移动开发 时间:
2015-08-05 12:44:22
阅读次数:
170
// 删除模型数据 [self.mutableArr[indexPath.section] removeObjectAtIndex:indexPath.row]; //删除UI(刷新数据,UI) [self.dmSelectTableView deleteRowsAtInde...
分类:
编程语言 时间:
2015-07-31 14:45:38
阅读次数:
126
假如你是用代码方式直接将控件(如UILabel、UIButton等)加到UITableView的cell中去的话,,,在出了-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)...
分类:
其他好文 时间:
2015-07-29 15:41:44
阅读次数:
125
有很多时候,UITableViewCell每行的高度是不固定的,需要动态设置。
UITableView有个代理方法,
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return ((CZWeiboFrame*)[self.weiboFrames...
分类:
其他好文 时间:
2015-07-27 19:10:14
阅读次数:
92
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { if ([self.tableView r....
分类:
其他好文 时间:
2015-07-27 09:24:25
阅读次数:
133
效果:
collectionView的数据源方法
- (UICollectionViewCell *) collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath
*)indexPath
{
newsCell *cell = [collectionVi...
分类:
其他好文 时间:
2015-07-24 14:27:18
阅读次数:
114