`

Cell

阅读更多
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
selectedCellIndexPath = indexPath;
   
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationNone];
   
[tableView scrollToNearestSelectedRowAtScrollPosition:UITableViewScrollPositionNone animated:YES];
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
if(selectedCellIndexPath != nil && [selectedCellIndexPath compare:indexPath] == NSOrderedSame)
       
return kTableViewExpandRowHeight;
   
else
        return kTableViewCollapseRowHeight;
}




- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
      [tableView deselectRowAtIndexPath:indexPath animated:YES];
}

填星星,demo,AdvancedTableViewCells
- (void)drawRect:(CGRect)rect
{
    CGPoint ratingImageOrigin = CGPointMake(81.0, 45.0);
    UIImage *ratingBackgroundImage = [UIImage imageNamed:@"StarsBackground.png"];
    [ratingBackgroundImage drawAtPoint:ratingImageOrigin];
   

    UIImage *ratingForegroundImage = [UIImage imageNamed:@"StarsForeground.png"];
   
    UIRectClip(CGRectMake(ratingImageOrigin.x, ratingImageOrigin.y,
                          ratingForegroundImage.size.width * (_cell.rating / MAX_RATING),
                          ratingForegroundImage.size.height));
   
   
    [ratingForegroundImage drawAtPoint:ratingImageOrigin];
}

- (void)_commonInit
{
    backgroundImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"StarsBackground.png"]];
    backgroundImageView.contentMode = UIViewContentModeLeft;
    [self addSubview:backgroundImageView];
   
    foregroundImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"StarsForeground.png"]];
    foregroundImageView.contentMode = UIViewContentModeLeft;
    foregroundImageView.clipsToBounds = YES;
    [self addSubview:foregroundImageView];
}




    UITableView *tab;
   
   
    BOOL animations = [UIView areAnimationsEnabled];
    [UIView setAnimationsEnabled:YES];
    [tab beginUpdates];
    [tab endUpdates];
    [UIView setAnimationsEnabled:animations];
分享到:
评论

相关推荐

    华表cell组件帮助手册

    Cell5.1产品分Cell组件5.1和Cell插件5.1两个姐妹产品,它们是北京用友华表软件技术有限公司在长期开发实践的基础上推出的功能强大、技术成熟的报表二次开发工具。 Cell组件(Activex 控件,扩展名为OCX)主要适用于...

    cell_double.rar_cell_cell double_cell类型转换_cell转double_文件转换为cell

    将cell类型的数据转换为double类型的函数

    Cell5.1产品分Cell组件5.1和Cell插件5.1两个姐妹产品

    Cell5.1产品分Cell组件5.1和Cell插件5.1两个姐妹产品,它们是北京用友华表软件技术有限公司在长期开发实践的基础上推出的功能强大、技术成熟的报表二次开发工具。 Cell组件(Activex 控件,扩展名为OCX)主要适用于...

    cell维护常用命令

    一TICLI 中的命令(其中[;ucl]可加可不加)) ...init:cell X:spp as init:cell X:spp rms inh:cell,flash,extern 5. 看基站里CRC中的软件 MD/CP站:op:cell X,cdm Y,generic CDBS(MM)站:op:cell X,bbu 1,generic

    华表cell帮助手册

    cell帮助手册 华表cell中文帮助手册

    用友华表CELL插件Demo

    用友华表CELL插件Demo 用友华表的CELL插件是一款基于ActiveX技术的解决中国式报表显示和打印的第三方控件, 和其它第三方ActiveX控件一样,用友华表CELL插件只能运行在客户端,只能使用JAVASCRIPT、VBSCRIPT客户端...

    Cell_cell文档_Cell类的API文档_cell_cell类API_

    cell开发文档,非常有用的cell表格开发api,适用于表格类开发人员

    cell控件帮助文件

    cell控件帮助文件 cell控件帮助文件 cell控件帮助文件

    UITableView删除Cell示例

    2.实现了可删除的tableViewCell,向左划动某个cell,cell右侧会出现“删除”按钮,点击即可将当前cell删除,删除伴有简单的动画效果。 3.实现了tableView的下拉刷新功能,下拉tableView的过程中,将依次显示“下拉...

    UItableView多cell实现

    当UITableView遇到多cell时,往往我们要建立多个cell,这是就会显得类多,臃肿。 demo采用了工厂模式,用父类cell指针指向子类cell,减少类臃肿,不好维护的效果

    in cell Tp工作原理

    in cell tp 工作原理,

    HOG_hog_cell_HOG;_

    方向梯度直方图(Histogram of Oriented ...之后将每几个 cell 组成一个 block(以 3*3 为例),一个 block 内所有 cell 特征串联起来得到该 block的 HOG 特征 descriptor并串联,就可以得到该物体分类后的特征。

    破解thinkcell时间限制

    thinkcell 的有效期只有15天,每隔15天就要找一次码太麻烦了,有了这个程序加上python,就可以自动跳过thinkcell的有效期限制啦

    tableview自适应cell高度

    tableview手动适应cell高度,以及iOS8之后自动适应cell高度

    cell数组MATLAB详情介绍使用排序.doc

    cell数组MATLAB详情介绍使用排序.doccell数组MATLAB详情介绍使用排序.doccell数组MATLAB详情介绍使用排序.doccell数组MATLAB详情介绍使用排序.doccell数组MATLAB详情介绍使用排序.doccell数组MATLAB详情介绍使用排序...

    真正实现 全屏 满屏 最大化 的 空当接龙 Freecell 3.50 20150909 3.50

    真正实现 全屏 满屏 最大化 的 空当接龙 Freecell 3.50 20150909 3.50版是在向海飞的空档接龙3.30版基础上修改而来,适合需要全屏 满屏 最大化 大窗口大图标大字体的网友使用。 3.30版问题:全屏时手动或自动解答...

    Cell 报表插件5.3.8.0620

    内容 Cell 插件的核心文件 包括cell插件 cab分发包 帮助文件 加密狗驱动文件 Cell组件(Activex 控件,扩展名为OCX)主要适用于开发windows应用程序,是为商业软件解决实际开发过程中的图表、报表显示,输入,打印...

    CELL ASP报表插件

    Cell 插件用于开发B/S结构程序,使用Asp, Asp.net, Jsp, VbScript, JavaScript等语言开发,可以在浏览器中直接打印报表(非IE打印),带有国际化数字签名,让用户使用更方便,更安全。 · 具备Cell组件的所有特色...

    Cell插件ASP报表设计源码.7z

    Cell插件基于Xml技术实现客户端与服务器端数据交换的ASP源代码。需要安装用友华表软件技术有限公司的Cell插件后才能正常观看,请先下载Cell插件。 Cell网站: Http://Www.Cellsoft.Cc/Cell/Index.Asp Cell插件下载...

    麦肯锡工具软件:think_cell详细教程

    麦肯锡工具软件:think_cell详细教程

Global site tag (gtag.js) - Google Analytics