UIViewAnimation 详解

@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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值