偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

Xcode學(xué)習(xí)之UIView動(dòng)畫例子實(shí)踐

移動(dòng)開發(fā) iOS
本文介紹的是Xcode學(xué)習(xí)之UIView動(dòng)畫例子實(shí)踐,詳細(xì)的介紹了UIView動(dòng)畫例子實(shí)踐的內(nèi)容,先來看內(nèi)容詳解。

Xcode學(xué)習(xí)之UIView動(dòng)畫例子實(shí)踐是本文要介紹的內(nèi)容,主要是學(xué)習(xí)UIView動(dòng)畫例子實(shí)踐,來學(xué)習(xí)xcode的相關(guān)內(nèi)容,進(jìn)一步的去學(xué)習(xí)和了解xcode,先來看內(nèi)容詳解。

淡入淡出效果的例子,其中對(duì)象關(guān)系圖:

  1. SampleAppDelegate  
  2.     HelloController init  
  3.         ToggleView init  
  4.             UIImageView init  
  5.             self addSubview  
  6.             UIImageView release  
  7.         ToggleView release 

其它對(duì)象釋放

關(guān)于淡入淡出的事件觸發(fā)放在ToggleView的touchesBegan事件,實(shí)現(xiàn)的是對(duì)ToggleView本身的動(dòng)畫,從而達(dá)到對(duì)子視圖UIImageView的淡出淡入的效果的控制,而UIImageView視圖作為子視圖不允許發(fā)生觸摸交換(imgView.userInteractionEnabled = NO;),僅控制自身的顯示情況

現(xiàn)在學(xué)習(xí)下UIView的新方法,下面是淡入淡出效果實(shí)現(xiàn);

  1.   // perform the fade out or fade in      
  2. CGContextRef context = UIGraphicsGetCurrentContext();      
  3. [UIView beginAnimations:nil context:context];      
  4. [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];      
  5. [UIView setAnimationDuration:1.0];      
  6. [[self viewWithTag:IMAGE_VIEW_TAG] setAlpha:(float)isVisible];//注意,這個(gè)對(duì)當(dāng)前子視圖設(shè)置顯示屬性      
  7. [UIView commitAnimations]; 

UIView類

類方法:(動(dòng)畫部分)

  1. beginAnimations:context:  
  2.  
  3. + (void)beginAnimations:(NSString *)animationID context:(void *)context  
  4.  
  5. Marks the beginning of a begin/commit animation block.  
  6.  
  7. setAnimationCurve:  
  8.  
  9. + (void)setAnimationCurve:(UIViewAnimationCurve)curve  
  10.  
  11. Sets the curve to use when animating property changes within an animation block.  
  12.  
  13. setAnimationDuration:  
  14.  
  15. + (void)setAnimationDuration:(NSTimeInterval)duration  
  16.  
  17. Sets the duration (measured in seconds) of the animations in an animation block.  
  18.  
  19. commitAnimations  
  20.  
  21. + (void)commitAnimations  
  22.  
  23. Marks the end of a begin/commit animation block and schedules the animations for execution. 

Constants/常量

  1. UIViewAnimationCurveEaseInOut  
  2.  
  3. An option for specifying an ease-in ease-out timing curve for the animation. An ease-in ease-out curve causes the animation to begin slowly,
  4.  accelerate through the middle of its duration, and then slow again before completing. This is the default curve for most animations.  
  5.  
  6. UIViewAnimationCurveEaseIn  
  7.  
  8. An option for specifying an ease-in timing curve for the animation. An ease-in curve causes the animation to begin slowly, 
  9. and then speed up as it progresses.  
  10.  
  11. UIViewAnimationCurveEaseOut  
  12.  
  13. An option for specifying an ease-out timing curve for the animation. An ease-out curve causes the animation to begin quickly, 
  14. and then slow down as it finishes.  
  15.  
  16. UIViewAnimationCurveLinear  
  17.  
  18. An option for specifying a linear timing curve for the animation. A linear animation curve causes an animation to occur evenly over its duration. 

小結(jié):Xcode學(xué)習(xí)之UIView動(dòng)畫例子實(shí)踐的內(nèi)容介紹完了,希望本文對(duì)你有所幫助!

責(zé)任編輯:zhaolei 來源: 博客園
相關(guān)推薦

2011-08-01 10:13:46

Xcode 視圖 動(dòng)畫

2012-12-24 13:38:01

iOSUIView

2011-08-16 18:13:42

IPhone開發(fā)UIView動(dòng)畫

2011-07-20 14:31:56

XCode User Scrip 腳本

2011-08-01 15:57:58

2011-08-01 16:50:28

Xcode 動(dòng)態(tài) View

2011-08-01 17:01:02

Xcode WindowBase View

2011-08-15 13:50:06

IPhone開發(fā)UIView動(dòng)畫

2011-08-01 17:50:28

Xcode

2011-08-12 11:31:46

iPhoneUIView動(dòng)畫

2011-08-10 14:00:22

XcodeUIWebView視頻

2011-08-11 16:31:08

XCode

2011-08-18 10:17:21

Xcode4Xcode

2011-07-25 15:42:38

Xcode Vim

2011-08-08 17:05:02

XCode UserScript 腳本

2011-08-19 15:16:41

XCodeUserScripts腳本

2011-08-01 09:26:51

Xcode Xcode 4 Instrument

2013-07-25 15:19:23

iOS開發(fā)學(xué)習(xí)Xcode打包framiOS開發(fā)

2011-08-03 16:26:14

iPhone UIView 動(dòng)畫

2011-08-03 16:35:10

iPhone UIView 動(dòng)畫
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)