基本函数: + (void)beginAnimations:(NSString *)animationID context:(void *)context; // 开始准备动画 + (void)commitAnimations; // 运行动画 // 没有get方法,下面的set在外调用无效 + (void)setAnimationDelegate:(id)delegate; // 委托default = nil + (void)setAnimationWillStartSelector:(SEL)selector; // default = NULL. -animationWillStart:(NSString *)animationID context:(void *)context + (void)setAnimationDidStopSelector:(SEL)selector; // default = NULL. -animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context + (void)setAnimationDuration:(NSTimeInterval)duration; // default = 0.2动画时间 + (void)setAnimationDelay:(NSTimeInterval)delay; // default = 0.0延迟多少时间开始执行动画 + (void)setAnimationStartDate:(NSDate *)startDate; // default = now ([NSDate date])动画开始日期?不知道啥用.- - + (void)setAnimationCurve:(UIViewAnimationCurve)curve; // default = UIViewAnimationCurveEaseInOut动画方式 + (void)setAnimationRepeatCount:(float)repeatCount; // default = 0.0. May be fractional重复次数 + (void)setAnimationRepeatAutoreverses:(BOOL)repeatAutoreverses; // default = NO. YES的话,动画(非最后一次)结束后动态复原到最开始状态 + (void)setAnimationBeginsFromCurrentState:(BOOL)fromCurrentState; // default = NO. 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)setAnimationTransition:(UIViewAnimationTransition)transition forView:(UIView *)view cache:(BOOL)cache; // 添加动画到view上,cache是YES的时候比较高效,但是动画过程中不能更新界面上的内容,NO时每一帧都重新画,可以实时更新 + (void)setAnimationsEnabled:(BOOL)enabled; // 是否忽略一些动画设置 + (BOOL)areAnimationsEnabled;
ios 对于UIView的动画的初步理解
最新推荐文章于 2019-04-25 19:21:08 发布