How to make image Disappear on touching it?
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.
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
精彩评论