background image

22.               //  Slowly 

zoom back down and hide the view   

23.        [UIView beginAnimations:nil context:UIGraphicsGetCurrentContext()];   

24.        [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];   

25.        [UIView setAnimationDuration:1.0f];   

26.               [self.view  viewWithTag:101].transform  =  CGAffineTransformMakeScale(0.01f, 

0.01f);   

27.        [UIView commitModalAnimations];   

28.         

29.        // Restore the bar button   

30.        [self.view viewWithTag:101].alpha = 0.0f;  

tnnd 原来可以这么写。

同时学到个新玩意。

C 代码

1.        [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:1.0f]];  

PS. 原来这个例子就叫做 Modal View Animation 罪过罪过,搞了这么久 iPhone 还不知道

这东西。

抱歉,看错了,原来是作者自己实现的方法,仔细一看原来

C 代码

1.        commitModalAnimations  

具体代码实现是这样的。

Java 代码

1.        @interface UIViewDelegate : NSObject   

2.        {   

3.        CFRunLoopRef currentLoop;   

4.        }   

5.        @end   

6.         

7.        @implementation UIViewDelegate   

8.        -(id) initWithRunLoop: (CFRunLoopRef)runLoop   

9.        {   

10.        if (self = [super init]) currentLoop = runLoop;   

                   找软件资料,就到一览软件文库

http://wk.yl1001.com/rj/