几种cell动画
来源:互联网 发布:电气画图用什么软件 编辑:程序博客网 时间:2024/06/10 04:49
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.row == 1 && indexPath.section <2) {
cell.layer.shadowColor = [[UIColor blackColor] CGColor];
cell.layer.shadowOffset = CGSizeMake(10,10);
cell.alpha = 0;
cell.layer.transform = CATransform3DMakeScale(0.5, -0.15,1);
cell.layer.anchorPoint = CGPointMake(0.5, -0.5);
// define final state (e.g. after animation) & commit animation
[UIView beginAnimations:@"scaleTableViewCellAnimationID" context:NULL];
[UIView setAnimationDuration:1];
cell.layer.shadowOffset = CGSizeMake(0,0);
cell.alpha = 1;
cell.layer.transform = CATransform3DIdentity;
[UIView commitAnimations];
}
}
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
if ([[NSUserDefaultsstandardUserDefaults]boolForKey:kCouponCacheFlag] ) {
if (indexPath.row ==1 && indexPath.section <2) {
// cell.layer.shadowColor = [[UIColor blackColor] CGColor];
// cell.layer.shadowOffset = CGSizeMake(10, 10);
// cell.alpha = 0;
// cell.layer.transform = CATransform3DMakeScale(1, -1, 1);
// cell.layer.anchorPoint = CGPointMake(0.5, -0.5);
cell.height = 64 ;
cell.alpha = 0;
cell.top = cell.top-96;
[UIView animateWithDuration:.8delay:indexPath.section*.5options:UIViewAnimationOptionCurveEaseInOutanimations:^{
cell.layer.shadowOffset =CGSizeMake(0, 0);
cell.alpha = 1;
// cell.layer.transform = CATransform3DIdentity;
cell.height = 96;
cell.top = 0;
} completion:^(BOOL finished) {
}];
}
}
}
//This function is where all the magic happens
//-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
// if (indexPath.row ==1) {
// if(kAnimationFlag==2)
// return;
// CGFloat originHeight = cell.height;
// cell.top = -originHeight;
// cell.height = 0;
// [UIView animateWithDuration:.2*(indexPath.section+2)
// delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
// cell.top = 0;
// cell.height = originHeight;
// kAnimationFlag ++;
// } completion:^(BOOL finished){
// kAnimationFlag--;
// }];
// }
//// //1. Setup the CATransform3D structure
//// CATransform3D rotation;
//// rotation = CATransform3DMakeRotation( (90.0*M_PI)/180, 0.0, 0.7, 0.4);
//// rotation.m34 = 1.0/ -600;
////
//// //2. Define the initial state (Before the animation)
//// cell.layer.shadowColor = [[UIColor blackColor]CGColor];
//// cell.layer.shadowOffset = CGSizeMake(10, 10);
////cell.alpha = 0;
////cell.layer.transform = rotation;
////cell.layer.anchorPoint = CGPointMake(0, 0.5);
//
////3. Define the final state (After the animation) and commit the animation
//[UIView beginAnimations:@"postio" context:NULL];
//[UIView setAnimationDuration:0.8];
//cell.layer.transform = CATransform3DIdentity;
//cell.alpha = 1;
//cell.layer.shadowOffset = CGSizeMake(0, 0);
//[UIView commitAnimations];
// }
//}
- 几种cell动画
- 自定义Cell几种方法
- cell的几种style
- 几种display:table-cell的应用
- 几种display:table-cell的应用
- display:table-cell的几种应用
- 几种UITableview自定义Cell的办法
- 几种UITableview自定义Cell的办法
- 非常简单的几行代码实现炫酷的tableview cell动画
- 动画删除cell出问题
- cell 动画效果之一
- cell动画显示
- 给cell添加动画
- animation 几种动画效果
- CoolUIViewAnimations 几种动画效果
- android的几种动画
- android几种动画分析
- android几种动画分析
- 重载内核全程分析笔记
- 相对URL的解析算法
- ZenTao不支持Win8.1问题解决
- 企业应用NoSQL的关键
- Qt 之 QAction
- 几种cell动画
- 教师寝室内被乡政府职工杀死
- txt 转换为 xml
- Protocol Buffers 中实现ZeroCopyStream 来减少内存拷贝
- 随机数生成不重复的一组数(类似于抓阄)
- 苏女研究生捂死5个月大女儿
- 新人不懂怎么下手?传说中的前端流程呐~~~
- oracle 11g完美导出到oracle10g
- 阿的份上噶的风格啊电饭锅