成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

iPhone開發中動畫效果實現分類附代碼

移動開發 iOS
本文介紹的是iPhone開發中動畫效果實現分類的代碼,主要是實現動畫中分類的效果,來看內容。

iPhone開發中動畫效果實現分類代碼是本文要介紹的內容,但是內容不是很多,主要是以代碼的形式來實現動畫的分類,來看詳細代碼,希望對你幫助!

  1. {  
  2.     [UIView beginAnimations:nil context:nil];  
  3.     [UIView setAnimationRepeatCount:1];  
  4.     [UIView setAnimationDuration:1];  
  5.     [UIView setAnimationCurve:UIViewAnimationCurveEaseIn];   
  6.     [UIView setAnimationDelegate:self];  
  7.     [UIView setAnimationDidStopSelector:@selector(resetView)];  
  8.       
  9.     CGAffineTransform oneTransform = CGAffineTransformRotate(self.animatView.transform, degreesToRadian(180));  
  10.     CGAffineTransform twoTransform = CGAffineTransformTranslate(self.animatView.transform,0,-100);  
  11.     CGAffineTransform newTransform = CGAffineTransformConcat(oneTransform, twoTransform);  
  12.     [self.animatView setTransform:newTransform];  
  13.     [UIView commitAnimations];  
  14. }  
  15. - (void) second_animations  
  16. {  
  17.     CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"opacity"];  
  18.     [animation setDuration:1];  
  19.     [animation setRepeatCount:0];  
  20.     [animation setAutoreverses:YES];//自動反向動畫  
  21.     [animation setFromValue:[NSNumber numberWithFloat:1.0]];  
  22.     [animation setToValue:[NSNumber numberWithFloat:0]];  
  23.     [animation setDelegate:self];  
  24.     [self.animatView.layer addAnimation:animation forKey:@"firstView-Opacity"];  
  25. }  
  26. - (void) third_animations  
  27. {  
  28.     [UIView beginAnimations:nil context:nil];  
  29.     [UIView setAnimationRepeatCount:1];  
  30.     [UIView setAnimationDuration:1];  
  31.     [UIView setAnimationCurve:UIViewAnimationCurveEaseIn];   
  32.     [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.containView cache:YES];  
  33.     [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:)];  
  34.     [UIView commitAnimations];  
  35. }  
  36. - (void) fourth_animations  
  37. {  
  38.     CATransition *transition = [CATransition animation];  
  39.     transition.duration = 1.0f;           
  40.     transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];   
  41.     transition.type = @"pageCurl";  //@"cube" @"moveIn" @"reveal" @"fade"(default) @"pageCurl" 
  42. @"pageUnCurl" @"suckEffect" @"rippleEffect" @"oglFlip"  
  43.     transition.subtype = kCATransitionFromRight;  
  44.     transition.removedOnCompletion = YES;  
  45.     transition.fillMode = kCAFillModeBackwards;  
  46.     transition.delegate = self;  
  47.     [self.animatView.layer addAnimation:transition forKey:nil];    
  48. }  
  49. -(void) resetView  
  50. {  
  51.     [self.animatView setTransform:CGAffineTransformRotate(self.animatView.transform, degreesToRadian(180))];  
  52.     self.animatView.frame = CGRectMake(0, 0, 280, 200);  
  53. }  
  54. #pragma mark Delegate Methods  
  55. - (void)animationDidStop:(CAAnimation *) theAnimation finished:(BOOL) flag {  
  56.     self.animatView.frame = CGRectMake(0, 0, 280, 200);  
  57. }  
  58.  
  59. #define degreesToRadian(x) (M_PI * (x) / 180.0) 

小結:iPhone開發中動畫效果實現分類代碼的內容介紹完了,希望通過本文的學習對你有所幫助!

責任編輯:zhaolei 來源: 互聯網
相關推薦

2011-08-12 14:04:53

iPhone動畫

2011-07-08 10:15:15

IPhone 動畫

2011-08-08 10:42:46

iPhone UITableVie 分頁

2011-08-16 18:13:42

IPhone開發UIView動畫

2011-08-22 14:21:24

iPhone開發UIView Anim

2010-09-10 09:57:27

DIV樣式

2011-07-29 13:55:10

IPhone 動畫

2011-07-08 15:08:16

iPhone 圖片

2011-07-22 18:20:04

IOS View 動畫

2017-01-22 17:25:55

Android放大鏡效果源碼分析

2013-07-05 10:26:40

Android

2011-08-15 11:23:41

iPhone開發循環滾動UIScrollVie

2011-08-15 13:50:06

IPhone開發UIView動畫

2009-12-25 14:25:39

WPF圖標

2022-07-28 14:33:32

webviewweb頁面

2010-08-03 11:29:09

Flex全屏

2010-09-10 14:33:32

SQL循環語句

2011-07-27 11:19:33

iPhone UITableVie

2011-08-12 11:31:46

iPhoneUIView動畫

2011-08-16 14:54:12

iphone開發APP
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 午夜视频在线观看网址 | 免费黄色网址视频 | 黄色大片免费看 | 久久精品在线免费视频 | av天天干| 日韩在线精品强乱中文字幕 | a级片在线 | a级免费观看视频 | 久久久久国产精品 | www.av7788.com| 国产高清精品在线 | 日本成人区 | h视频在线免费 | 国产日韩视频 | 岛国av免费看 | 欧美成年黄网站色视频 | 九九av| 91黄在线观看 | 日韩在线播放网址 | 天堂在线中文 | 欧美激情视频网站 | 日韩精品成人 | 成人一区二区电影 | 国产精品久久av | av一二三区 | 亚洲午夜精品在线观看 | 日本三级网址 | 孰女乱色一区二区三区 | 成年人在线视频 | 国产精品一区二区不卡 | 亚洲精品一区二区 | 狠狠干网| 美女久久视频 | 国产性生活一级片 | 91色视频在线观看 | 久久久精品一区二区 | 天天拍天天草 | 成人性视频免费网站 | 亚洲视频一区二区三区四区 | 欧美片网站免费 | 自拍中文字幕 |