有关动画的code(2中 以后慢慢添加)
来源:互联网 发布:布艺沙发床价格淘宝 编辑:程序博客网 时间:2024/05/28 05:15
//CABasicAnimation
[blackView.layeraddAnimation:[selfopacityForever_Animation:3.0]forKey:@"key"];
//UIView Animation
[self animationRevealFromBotton:100];
transform.scale.x 宽的比例转换
transform.scale.y 高的比例转换
transform.rotation.z 平面圆的旋转
opacity 透明度
margin 在视图中展示内容的大小
zPosition 屏幕上层次的前后顺序
backgroundColor 背景颜色
cornerRadius 圆角
borderWidth 边的宽度
bounds layer的边界矩阵, 与frame类似contents内容, 例如:图片的变化 contentsRect 内容可使用layer的大小frame 视图的frame矩阵hidden隐藏状态 mask 遮挡背景和内容显示的透明度 masksToBounds决定子layer是否从layer的边界中剪除position layer在其父layer中对应的位置shadowColor阴影颜色shadowOffset 阴影偏移量shadowOpacity阴影透明度shadowRadius 阴影圆角
- (CABasicAnimation *)opacityForever_Animation:(float)time
//永久闪烁的动画:渐变
{
//参数必须是layer的属性“属性”
CABasicAnimation *animation=[CABasicAnimationanimationWithKeyPath:@"backgroundColor"];
//属性的值的变换
// animation.fromValue=[NSNumber numberWithFloat:1.0];
// animation.toValue=[NSNumber numberWithFloat:3.0];
//位置变换 点对点
animation.fromValue = [NSValuevalueWithCGPoint:CGPointMake(125,125)];
animation.toValue = [NSValuevalueWithCGPoint:CGPointMake(self.view.frame.size.width /2, self.view.frame.size.height /2)];
animation.autoreverses=YES;
//持续时间
animation.duration=time;
//重复次数
animation.repeatCount=FLT_MAX;
animation.removedOnCompletion=NO;
animation.fillMode=kCAFillModeForwards;
return animation;
}
- (void)animationRevealFromBotton:(float)duration
{
[UIView animateWithDuration:durationanimations:^{
blackView.transform =CGAffineTransformMakeScale(0.001,0.001);
CABasicAnimation *animation = [CABasicAnimationanimationWithKeyPath:@"transform"];
animation.toValue = [NSValuevalueWithCATransform3D:CATransform3DMakeRotation(M_PI,0.70, 0.40,0.80)];
animation.duration = 0.45;
animation.repeatCount = FLT_MAX;
[blackView.layeraddAnimation:animation forKey:nil];
} completion:^(BOOL finished) {
[UIView animateWithDuration:durationanimations:^{
blackView.transform =CGAffineTransformMakeScale(1.0,1.0);
}];
}];
}
- 有关动画的code(2中 以后慢慢添加)
- 1+2+3+...+100的几种方法(以后慢慢积累)
- 留着以后慢慢做的树形DP(题表)
- 留着以后慢慢做的网络流(题表)
- 留着以后慢慢做的DP(题表)
- 留着以后慢慢做的数位DP(题表)
- 留着以后慢慢做的二分三分(题表)
- SQLite的一点学习心得(以后会慢慢补充)
- LaTex+beamer+animate中让图像慢慢放大的动画
- 数组(慢慢添加)
- 留着以后慢慢做的DP
- 留着以后慢慢做的数据结构
- Android 内存泄露总结(现在列举的情况不是很多,以后会慢慢更新)
- 留着以后慢慢做的图论(题单)
- unity3d 中动画的添加
- 关于scroolView自己慢慢滑动的动画
- csdn上的一些文章,留着先,以后慢慢看
- 可能以后要慢慢看完的一些书
- 第22章:自动完成文本框AutoCompleteTextView的用法
- C++ Primer 第(1-3)章一句话知识点总结
- 基于CXF WebService(4)高级属性之Invoker
- 数据库创建和增删改查
- 架构师速成-有关架构的思考
- 有关动画的code(2中 以后慢慢添加)
- HDU 3530 Subsequence
- PHP基础----01PHP标记符
- htop: 比top好用的Linux进程管理监控工具
- mysql和oracle的一个汉字占几个字符
- LeetCode(153) Find Minimum in Rotated Sorted Array
- wamp下修改mysql root用户的登录密码方法
- Swift学习05-optional可选类型
- C++ STL 基础