Xcode Place an Image where the user touches
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *touch=[[event allTouches]anyObject];
CGPoint point= [touch locationInView:touch.view];
UIImage *image = [[UIImage alloc]initWithContentsOfFile:@"BluePin.png"];
[image drawAtPoint:point];
}
Basically touch screen image should appear where touched but nothing appears…
You should init a UIImage like this:
You should use a UIImageView to contain a UIImage, you can not put a UIImage into UIView directly.
update