views:

40

answers:

1

hi, I am working on apllication for iphone in xcode 3.1.

I want similar two images to disappear when touched one after other.

I have succeed in displaying two images on iphone simulator on touching

'PlAY' button.

Now i want that when two same images are 'touched' one after another,they should disappear.

Expect code in Objective C.

A: 

You can do this, by using simple animations the view should disappear, later you can cast the context inside the UIView animations delegate and start a second animation.

aView.alpha = 1.0;
[UIView beginAnimations:nil context:@"Context1"];
[UIView setAnimationDuration: 1.0];
[UIView setAnimationCurve: UIViewAnimationCurveEaseOut];
[UIView setAnimationBeginsFromCurrentState:YES];
    aView.alpha = 0.0;
[UIView commitAnimations];

This id the delegate method you should implement:

-animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context
iPhoneDevProf