IVM冬虫夏草酱示例

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了IVM冬虫夏草酱示例相关的知识,希望对你有一定的参考价值。

A snippet of code from IVM-Awesomesauce that shows how to use included classes to perform a custom animation between two UIViewControllers.
  1. - (IBAction)leButtonTapped:(id)sender
  2. {
  3. NextViewController *nvc = [[NextViewController alloc] initWithNibName:@"NextViewController" bundle:nil] ;
  4.  
  5. // This performs a flipboard-like animation
  6. ASAnimatedTransition *animatedTransition = [[ASAnimatedTransition alloc] init] ;
  7. animatedTransition.sourceView = self.view ;
  8. animatedTransition.destinationView = nvc.view ;
  9. animatedTransition.hostView = self.view ;
  10. animatedTransition.initializeAnimationBlock = ^(AnimationView *animationView, CALayer *sourceLayer, CALayer *destinationLayer)
  11. {
  12. CATransform3D transform = CATransform3DIdentity ;
  13. transform.m34 = 1.0 / -200 ;
  14. transform = CATransform3DTranslate(transform, 0, 5, -25) ;
  15. destinationLayer.transform = transform ;
  16. } ;
  17. animatedTransition.performAnimationBlock = ^(AnimationView *animationView, CALayer *sourceLayer, CALayer *destinationLayer)
  18. {
  19. [CATransaction setAnimationDuration:0.6] ;
  20. sourceLayer.position = CGPointMake(sourceLayer.position.x, -sourceLayer.frame.size.height/2.0) ;
  21. destinationLayer.transform = CATransform3DIdentity ;
  22. } ;
  23. animatedTransition.animationFinishedBlock = ^()
  24. {
  25. [self.navigationController pushViewController:nvc animated:NO] ;
  26. } ;
  27. [animatedTransition performTransition] ;
  28. }

以上是关于IVM冬虫夏草酱示例的主要内容,如果未能解决你的问题,请参考以下文章

英语WinterwormSummerherb冬虫夏草

IVM

艾多美洗面奶atom美atomy泡沫美白洗面奶杀死螨虫清洁皮肤Foam Cleansing

请用酱实验室代码提出这个硒脚本有啥问题

需要示例代码片段帮助

CSDN|每日一练小艺的英文名