Cocoa Touch animation delaying command

263 views Asked by At

What is the command of delaying an action to fade in an image?

3

There are 3 answers

0
D.C. On

I find the new block-based animation methods on UIView pretty simple to work with:

https://developer.apple.com/documentation/uikit/uiview

You could do something like

UIImageView *yourPic;  // assume it exists
yourPic.opacity = 0.0;
[UIView animateWithDuration:1.0 animations:^
{
    yourPic.opacity = 1.0;
}
0
Splendid On

For Delaying the action u can do in AppDelegation, didFinishLaunchingWithOptions

          [NSThread sleepForTimeInterval:2];

For Fade in and Fade out of Image. u can use custom methods for Fade and fade out

Better you could see this post http://iosdevelopertips.com/user-interface/fade-transition-fade-images-in-and-out.html

0
Bogatyr On

Sounds like you want

+ (void)setAnimationDelay:(NSTimeInterval)delay

Use it like this (non-block based animations):

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDelay:1.5];
myImage.alpha = 1.0;
[UIView commitAnimations];