Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Binju

macrumors member
Original poster
Jan 31, 2010
65
0
Code:
if ([touch view] == imageview)
	{
		NSLog(@"[touch view] == imageview");
		
		CGPoint location = [touch locationInView:self];
		imageview.center = location;
		return;
	}


The above code is not working
 
I think you'll have to supply more information that that. What do you expect to happen? What do you observe happening? What have you tried doing to fix it?
 
What do you expect to happen?

I am having four images and I want to move the images when the user move the imageview (touchMoved() occurs).So I need to find which image is touched by the user.


What do you observe happening?

When I move the imageview, the imageview did not dedect by the [touch view] method.



What have you tried doing to fix it?

I checked with the userinteraction enabled property and i refered the sample code "touches"
 
OK, and where is that code? A custom subclass? Are you sure you are using that class not UIImageView (especially if you created this in Interface Builder)...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.