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

Xcode學習之UIView動畫例子實踐

移動開發 iOS
本文介紹的是Xcode學習之UIView動畫例子實踐,詳細的介紹了UIView動畫例子實踐的內容,先來看內容詳解。

Xcode學習之UIView動畫例子實踐是本文要介紹的內容,主要是學習UIView動畫例子實踐,來學習xcode的相關內容,進一步的去學習和了解xcode,先來看內容詳解。

淡入淡出效果的例子,其中對象關系圖:

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

其它對象釋放

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

現在學習下UIView的新方法,下面是淡入淡出效果實現;

  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];//注意,這個對當前子視圖設置顯示屬性      
  7. [UIView commitAnimations]; 

UIView類

類方法:(動畫部分)

  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. 

小結:Xcode學習之UIView動畫例子實踐的內容介紹完了,希望本文對你有所幫助!

責任編輯:zhaolei 來源: 博客園
相關推薦

2011-08-01 10:13:46

Xcode 視圖 動畫

2012-12-24 13:38:01

iOSUIView

2011-08-16 18:13:42

IPhone開發UIView動畫

2011-07-20 14:31:56

XCode User Scrip 腳本

2011-08-01 15:57:58

2011-08-01 16:50:28

Xcode 動態 View

2011-08-01 17:01:02

Xcode WindowBase View

2011-08-15 13:50:06

IPhone開發UIView動畫

2011-08-01 17:50:28

Xcode

2011-08-12 11:31:46

iPhoneUIView動畫

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開發學習Xcode打包framiOS開發

2011-08-03 16:26:14

iPhone UIView 動畫

2011-08-03 16:35:10

iPhone UIView 動畫
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 日韩a | 噜啊噜在线 | 久久国产日韩 | 精品一二三区 | 国产做a爱免费视频 | 欧美8一10sex性hd | 久久精品无码一区二区三区 | 黄色精品 | 久久久美女 | 欧美炮房 | 人人干免费 | 99re视频在线 | 久久久久无码国产精品一区 | 亚洲综合色网 | 午夜a v电影 | 久久久蜜桃一区二区人 | 国产主播第一页 | 中文天堂在线一区 | 国产99久久精品一区二区永久免费 | 亚洲va欧美va天堂v国产综合 | 午夜视频大全 | 欧美中文视频 | 国产亚洲精品精品国产亚洲综合 | 亚洲精品一区二区三区中文字幕 | 99色综合 | 91精品久久久久久久久久入口 | 亚洲精品日韩一区二区电影 | 中文字幕一区在线观看视频 | 久久免费观看视频 | 天天视频一区二区三区 | 毛片免费观看 | 久久久久国产 | 日本不卡视频在线播放 | 超碰人人91 | 国产精品69av | 国产电影一区二区三区爱妃记 | 日韩超碰在线 | 精品久久久久一区二区国产 | 韩国电影久久 | 久久精品国产精品青草 | 亚洲日韩欧美一区二区在线 |