Animaton in UIView like Alert (POP UP)

2019-03-30 08:48发布

问题:

I need some informative help about animation. Want to add animation in iPhone Application.. first thing is that create animated UIView like alert.. I searched elsewhere but not to find exact way.

Please help me about this issue.. There is a any blog tutorial or doc file you have than tell me..

回答1:

I don't wanna copy & paste

Please see this Great Question: How can I customize an iOS alert view?

Hope you will get what you need.



回答2:

Here are some effects for animations:

// Efects for Animation.
// 0 (UIViewAnimationTransitionNone)                                 Yes    
// 1 (UIViewAnimationTransitionFlipFromLeft)     oglFlip, fromLeft   Yes    
// 2 (UIViewAnimationTransitionFlipFromRight)    oglFlip, fromRight  Yes    
// 3 (UIViewAnimationTransitionCurlUp)           pageCurl            Yes    
// 4 (UIViewAnimationTransitionCurlDown)         pageUnCurl          Yes    
// 101   pageCurl                                                    Yes
// 102   pageUnCurl                                                  Yes
// 103   suckEffect                                                  Yes
// 104   spewEffect                                                  No 
// 105   cameraIris                                                  Yes
// 106   cameraIrisHollowClose                                       Yes
// 107   cameraIrisHollowOpen                                        Yes
// 108   genieEffect                                                 No 
// 109   unGenieEffect                                               No 
// 110   rippleEffect                                                Yes    
// 111   twist                                                       No 
// 112   tubey                                                       No 
// 113   swirl                                                       No 
// 114   charminUltra                                                No 
// 115   zoomyIn                                                     No 
// 116   zoomyOut                                                    No 
// 117   oglApplicationSuspend                                       No
//---------------------------------------------------------------------

And here is code for example how to use animation with UIWebView

// Begin Animation "suckEffect".
    [UIView beginAnimations:@"suck" context:NULL];
    [UIView setAnimationTransition:103 forView:webViewContainer cache:NO];
    [UIView setAnimationDuration:1.5f];
    [UIView setAnimationPosition:CGPointMake(300, 1)];
    [webView removeFromSuperView];
    [UIView commitAnimations];

I hope this will help you ... You can view this article to get more knowledges about animations !!!