@interface UIView(UIViewAnimation)
// 准备开始动画,animationID标识动画,context自定义消息
+ (void)beginAnimations:(NSString *)animationID context:(void *)context;
// 运行动画
+ (void)commitAnimations;
// 设置代理 default = nil
+ (void)setAnimationDelegate:(id)delegate;
// 将要开始动画时执行某些方法
+ (void)setAnimationWillStartSelector:(SEL)selector;
// 动画结束执行某些操作
+ (void)setAnimationDidStopSelector:(SEL)selector;
// default = 0.2 ,设置动画持续事件
+ (void)setAnimationDuration:(NSTimeInterval)duration;
// default = 0.0 , 设置动画开始时间
+ (void)setAnimationDelay:(NSTimeInterval)delay;
// default = now ([NSDate date]) , 设置动画开始日期
+ (void)setAnimationStartDate:(NSDate *)startDate;
// default = UIViewAnimationCurveEaseInOut 设置动画运动效果【注1】
+ (void)setAnimationCurve:(UIViewAnimationCurve)curve;
// default = 0.0. May be fractional 设置动画重复次数
+ (void)setAnimationRepeatCount:(float)repeatCount;
// default = NO. used if repeat count is non-zero
//动画自动重复,重复次数不能为0
+ (void)setAnimationRepeatAutoreverses:(BOOL)repeatAutoreverses;
// default = NO. If YES, the current view position is always used for new animations -- allowing animations to "pile up" on each other. Otherwise, the last end state is used for the animation (the default).
+ (void)setAnimationBeginsFromCurrentState:(BOOL)fromCurrentState;
// current limitation - only one per begin/commit
// 动画效果【注2】
+ (void)setAnimationTransition:(UIViewAnimationTransition)transition forView:(UIView *)view cache:(BOOL)cache;
// ignore any attribute changes while set.
+ (void)setAnimationsEnabled:(BOOL)enabled;
// 返回一个bool值,表示动画是否结束了
+ (BOOL)areAnimationsEnabled;
@end
UIViewAnimation 详解
最新推荐文章于 2021-12-11 12:47:55 发布