CAAnimation相关
来源:互联网 发布:jsp引入js文件 编辑:程序博客网 时间:2024/06/06 03:40
在一个delegate函数里面区分不同的caanimation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
CATransition *animation = [CATransition
animation
];
[animation
setType
:kCATransitionFade];
[animation
setSubtype
:kCATransitionFromTop];
[animation
setDelegate
:
self
];
[hearingAidHalo
setBackgroundImage
:[
UIImage
imageNamed
:
@
"m13_grayglow.png"
]
forState
:
UIControlStateNormal
];
[animation
setDuration
:2
.0
];
[animation
setValue
:
@
"Throb"
forKey
:
@
"MyAnimationType"
];
[[hearingAidHalo
layer
]
addAnimation
:animation
forKey
:
nil
];
- (
void
)animationDidStop:(CAAnimation *)theAnimation
finished
:(
BOOL
)flag{
NSString
* value = [theAnimation
valueForKey
:
@
"MyAnimationType"
];
if
([value
isEqualToString
:
@
"Throb"
])
{
//... Your code here ...
return
;
}
if
([value
isEqualToString
:
@
"Special1"
])
{
//... Your code here ...
return
;
}
//Add any future keyed animation operations when the animations are stopped.
}
2.CAAnimationGroup
Important: The delegate and removedOnCompletion properties of animations in the animations array are currently ignored. The CAAnimationGroup delegate does receive these messages.
3.要让一个ca动画终止后,保留末状态,在设置removedOnCompletion = NO后,还得设置fillMode = kCA…..Forward 这个宏名字不太记得了。。。
0 0
- CAAnimation相关
- CAAnimation
- CAAnimation
- CAAnimation
- CAAnimation
- CAAnimation
- CAAnimation
- CAAnimation
- CAAnimation动画/CAAnimation Group
- CAAnimation动画/CAAnimation Group
- CAAnimation动画/CAAnimation Group
- CAAnimation动画/CAAnimation Group
- CAAnimation动画/CAAnimation Group
- CAAnimation动画/CAAnimation Group
- CAAnimation解读
- CALayer CAAnimation
- CAanimation 浅析
- CAAnimation--CALayer
- HolderView vs ViewHolder实例
- MySql接口API函数综述
- 数值的整数次方
- 在iOS7中UIPageControl的改变
- EasyUI的tabs使用
- CAAnimation相关
- Java和JSP编程应该注意的六个常见问题
- css 清除浮动的方法
- freemarker标记实现翻页
- 奥林巴斯新款便携相机Stylus SH-1发布 具备五轴防抖哟
- 递推—杭电2045 不容易系列之(3)—— LELE的RPG难题
- 新手网上开店必知必会:推广与经营
- 巨头抢食可穿戴设备,资本版图在做大
- k近邻法的实现:kd树