几个可以用来实现热门APP应用PATH中menu效果的几个方法
来源:互联网 发布:网络平台的推广 编辑:程序博客网 时间:2024/06/05 01:56
几个可以用来实现热门APP应用PATH中menu效果的几个方法
+(CABasicAnimation *)opacityForever_Animation:(float)time //永久闪烁的动画
{
CABasicAnimation *animation=[CABasicAnimation animationWithKeyPath:@"opacity"];
animation.fromValue=[NSNumber numberWithFloat:1.0];
animation.toValue=[NSNumber numberWithFloat:0.0];
animation.autoreverses=YES;
animation.duration=time;
animation.repeatCount=FLT_MAX;
animation.removedOnCompletion=NO;
animation.fillMode=kCAFillModeForwards;
return animation;
}
+(CABasicAnimation *)opacityTimes_Animation:(float)repeatTimes durTimes:(float)time; //有闪烁次数的动画
{
CABasicAnimation *animation=[CABasicAnimation animationWithKeyPath:@"opacity"];
animation.fromValue=[NSNumber numberWithFloat:1.0];
animation.toValue=[NSNumber numberWithFloat:0.4];
animation.repeatCount=repeatTimes;
animation.duration=time;
animation.removedOnCompletion=NO;
animation.fillMode=kCAFillModeForwards;
animation.timingFunction=[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
animation.autoreverses=YES;
return animation;
}
+(CABasicAnimation *)moveX:(float)time X:(NSNumber *)x //横向移动
{
CABasicAnimation *animation=[CABasicAnimation animationWithKeyPath:@"transform.translation.x"];
animation.toValue=x;
animation.duration=time;
animation.removedOnCompletion=NO;
animation.fillMode=kCAFillModeForwards;
return animation;
}
+(CABasicAnimation *)moveY:(float)time Y:(NSNumber *)y //纵向移动
{
CABasicAnimation *animation=[CABasicAnimation animationWithKeyPath:@"transform.translation.y"];
animation.toValue=y;
animation.duration=time;
animation.removedOnCompletion=NO;
animation.fillMode=kCAFillModeForwards;
return animation;
}
+(CABasicAnimation *)scale:(NSNumber *)Multiple orgin:(NSNumber *)orginMultiple durTimes:(float)time Rep:(float)repeatTimes //缩放
{
CABasicAnimation *animation=[CABasicAnimation animationWithKeyPath:@"transform.scale"];
animation.fromValue=orginMultiple;
animation.toValue=Multiple;
animation.duration=time;
animation.autoreverses=YES;
animation.repeatCount=repeatTimes;
animation.removedOnCompletion=NO;
animation.fillMode=kCAFillModeForwards;
return animation;
}
+(CAAnimationGroup *)groupAnimation:(NSArray *)animationAry durTimes:(float)time Rep:(float)repeatTimes //组合动画
{
CAAnimationGroup *animation=[CAAnimationGroup animation];
animation.animations=animationAry;
animation.duration=time;
animation.repeatCount=repeatTimes;
animation.removedOnCompletion=NO;
animation.fillMode=kCAFillModeForwards;
return animation;
}
+(CAKeyframeAnimation *)keyframeAniamtion:(CGMutablePathRef)path durTimes:(float)time Rep:(float)repeatTimes //路径动画
{
CAKeyframeAnimation *animation=[CAKeyframeAnimation animationWithKeyPath:@"position"];
animation.path=path;
animation.removedOnCompletion=NO;
animation.fillMode=kCAFillModeForwards;
animation.timingFunction=[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
animation.autoreverses=NO;
animation.duration=time;
animation.repeatCount=repeatTimes;
return animation;
}
+(CABasicAnimation *)movepoint:(CGPoint )point //点移动
{
CABasicAnimation *animation=[CABasicAnimation animationWithKeyPath:@"transform.translation"];
animation.toValue=[NSValue valueWithCGPoint:point];
animation.removedOnCompletion=NO;
animation.fillMode=kCAFillModeForwards;
return animation;
}
+(CABasicAnimation *)rotation:(float)dur degree:(float)degree direction:(int)direction repeatCount:(int)repeatCount //旋转
{
CATransform3D rotationTransform = CATransform3DMakeRotation(degree, 0, 0,direction);
CABasicAnimation* animation;
animation = [CABasicAnimation animationWithKeyPath:@"transform"];
animation.toValue= [NSValue valueWithCATransform3D:rotationTransform];
animation.duration= dur;
animation.autoreverses= NO;
animation.cumulative= YES;
animation.removedOnCompletion=NO;
animation.fillMode=kCAFillModeForwards;
animation.repeatCount= repeatCount;
animation.delegate= self;
return animation;
}
- 几个可以用来实现热门APP应用PATH中menu效果的几个方法
- 几个热门app的动画
- 几个热门app的动画
- .NET中Path类的几个方法(转载)
- iOS开发资源:几个类似Path 2.0侧滑菜单的效果实现
- iOS开发资源:几个类似Path 2.0侧滑菜单的效果实现
- Linux中几个用来trace程序调用的工具
- Android中几个Activity实现平移效果
- JavaScript Array 可以扩展的几个方法
- 分享几个可以有助失眠的方法
- Android-Activity关于“菜单(Menu)”的几个方法
- itk几个可以实现rotate的filter
- 几个framelayout 的可以实现不重叠
- 实现定时器的几个方法
- 几个开关效果的CSS实现
- IOS中实现线程加锁的几个方法
- model模型中 要实现的几个方法
- Linux设置PATH环境变量的几个地方和设置方法
- Android绘制基础及手写绘制实例
- 如何用BIRT示例程序连接Oracle数据库
- javascript 中 清空div的内容
- IP地址与整数之间的转换
- 成为自己时间的掌控者
- 几个可以用来实现热门APP应用PATH中menu效果的几个方法
- Android WebView使用基础
- poj 3660
- http 405 错误
- 第七章——DMVs和DMFs(4)——用DMV和DMF监控磁盘IO
- Android WebView中的JavaScript代码使用
- 浅记C语言声明 [李园7舍_404]
- Oracle 字符集的查看和修改
- Android Phone 类的详细 分析 各个类的功能