Animation
是否允许子试图自动变化大小
bView.autoresizesSubviews = YES;
子视图变化的方式
eView.autoresizingMask = UIViewAutoresizingFlexibleWidth |UIViewAutoresizingFlexibleHeight;
基本动画
开始准备动画
[UIView beginAnimationDuration: 动画名称 context:文本]
动画持续时间
[UIView setAnimationDuration:时间]
点击后延迟时间
[UIView setAnimationDelay:时间]
设置动画
[UIView setAnimationTransition:动画效果 forView:动画的View cache:是否返回]
提交动画
[UIView commitAnimations]
CATransition * transition = [CATransition animation];//初始化
transition.duration = 1.0f;//动画效果时间
transition.timingFunction = [CAMediaTimingFunction
functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = @"cube";//动画效果 settype和setsubtype组合使用
transition.subtype = kCATransitionFromRight;//动画方式
[self.view.layer addAnimation:transition forKey:nil];//设置VIew
//时间触发事件
+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti target:(id)aTarget selector:(SEL)aSelector userInfo:(id)userInfo repeats:(BOOL)yesOrNo;
背景图片
self.backgroundColor = [UIColor colorWithPatternImage:image];//设置背景图片