1.最简单的UIViewAnimation使用方法:    特点:基础,使用方便,但是效果有限
使用示例:
UIView *temp = [self viewWithTag:(NSInteger)(loadNumber +1000)]; 
[UIView beginAnimations:nil context:nil];
 [UIView setAnimationDuration:0.3];
 [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; temp.alpha = 1; 
[UIView commitAnimations];
 
其中transition取值范围
typedef enum {
UIViewAnimationTransitionNone,
UIViewAnimationTransitionFlipFromLeft,
UIViewAnimationTransitionFlipFromRight,
UIViewAnimationTransitionCurlUp,
UIViewAnimationTransitionCurlDown,
} UIViewAnimationTransition;
 
2、使用UIView类的UIViewAnimationWithBlocks扩展:
特点:快捷方便,效果更多.可以如上示例1那样实现界面个元素属性渐进变化的动态展示
使用示例:
 [UIView animateWithDuration:0.3 animations:^{
        [temp setFrame:LEFTBIGIMAGEFRAME];
    } completion:^(BOOL finish){     
}];

 

 

 

相关文章:

  • 2021-12-08
  • 2021-11-28
  • 2021-09-20
  • 2021-08-01
  • 2021-12-12
  • 2021-11-20
  • 2021-11-11
  • 2021-11-29
猜你喜欢
  • 2021-09-29
  • 2021-11-29
  • 2021-11-29
  • 2021-11-29
  • 2021-09-02
  • 2021-10-18
  • 2021-11-29
  • 2021-10-08
相关资源
相似解决方案