Replace image with any other image when user tap on any image in IPhone?

You should place your images into UIImageView. After this check user taps and simply change image property in UIImageView to new image.

Up vote 0 down vote favorite share g+ share fb share tw.

I am creating a application to learn IPhone application development. It will look like

that. Now I want when user tap on any image then the tapped image will replace by any other image.

How can I do that. I am just drag and dropping the images and labels from library to xib file. Is it correct way to draw that look or should I use any other way to draw that look and feel.

Iphone xcode xcode4 ios-simulator link|improve this question asked Aug 5 '11 at 10:34vkwave6310 61% accept rate.

See this link developer.apple.com/library/ios/#samplec... – ram Aug 5 '11 at 10:39 in this link you will get idea how attach tap on image and function of tap. In function of tap instead of zoom you show image view – ram Aug 5 '11 at 10:40.

You should place your images into UIImageView. After this check user taps and simply change image property in UIImageView to new image. Code like this (in your viewController, for example) -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ UIView *imgView = touches anyObject view; if (view isKindOfClass:UIImageView.

Class){ UIImage *newImg = UIImage imageNamed:@"newImg. Png"; // newImg. Png should be in bundle (UIImageView*)view setImage:newImg; } }.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions