基本动画show() //直接显示元素,没有动画show(speed, [callback]) //有动画,有回调函数hide() //直接隐藏元素,没有动画hide(speed, [callback]) //有动画,有回调函数toggle() //切换可见状态toggle(speed, [call...
分类:
Web程序 时间:
2015-07-18 22:37:52
阅读次数:
161
最近iOS开发中用到CoreAnimation的framework来做动画效果,虽然以前也用过,但一直没有系统学习过,今天看到一篇非常详细的博文(虽然是日语,但真的写的很好),在此翻译出来供大家学习。
CABasicAnimation类的使用方式就是基本的关键帧动画。
所谓关键帧动画,就是将Layer的属性作为KeyPath来注册,指定动画的起始帧和结束帧,然后...
分类:
移动开发 时间:
2015-07-16 19:58:06
阅读次数:
233
几个可以用来实现热门APP应用PATH中menu效果的几个方法
+(CABasicAnimation *)opacityForever_Animation:(float)time //永久闪烁的动画
{
CABasicAnimation *animation=[CABasicAnimation animationWithKeyPath:@"opacity"];
...
分类:
其他好文 时间:
2015-07-16 19:58:03
阅读次数:
119
图层的一些基本动画效果#define kRadianToDegrees (radian) (radian * 180.0) / (M_PI)//闪烁[self.testView.layer addAnimation:[self opacityForever_Animation:0.5] forKey...
分类:
移动开发 时间:
2015-07-14 07:34:52
阅读次数:
196
// 创建组动画对象 CAAnimationGroup *group = [CAAnimationGroup animation]; // 创建基本动画 // 平移 CABasicAnimation *anim1 = [CABasicAnimation animati...
分类:
其他好文 时间:
2015-07-07 22:24:57
阅读次数:
105
1 //创建CABasicAnimation对象 2 CABasicAnimation *animation = [CABasicAnimation animation]; 3 //对其keypath赋值,大小(旋转,平移,缩放) 4 animation.keyPa...
分类:
其他好文 时间:
2015-07-07 20:59:47
阅读次数:
116
1.旋转动画 CABasicAnimation* rotationAnimation; rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; rotationAnimatio...
分类:
移动开发 时间:
2015-07-03 12:09:13
阅读次数:
132
在上一篇专题中我们提到,CAAnimation可分为以下四种:123456781.CABasicAnimation通过设定起始点,终点,时间,动画会沿着你这设定点进行移动。可以看做特殊的CAKeyFrameAnimation2.CAKeyframeAnimationKeyframe顾名思义就是关键点...
分类:
其他好文 时间:
2015-06-25 15:20:53
阅读次数:
144
RemovedOnCompletion
这个属性默认为 YES,那意味着,在指定的时间段完成后,动画就自动的从层上移除了。这个一般不用。
假如你想要再次用这个动画时,你需要设定这个属性为 NO。这样的话,下次你在通过-set 方法设定动画的属
性时,它将再次使用你的动画,而非默认的动画。
如果CABasicAnimation 按home键后台之后,再切回来动画就停止,只要将Rem...
分类:
其他好文 时间:
2015-06-23 17:52:33
阅读次数:
184
#import @interface TJProgressView : UIView@property(nonatomic,assign)CGFloat progressValue;- (void)showInView:(UIView *)baseView;@end//// TJProgressV....
分类:
其他好文 时间:
2015-06-12 18:52:26
阅读次数:
149