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

drf1229

macrumors regular
Original poster
Jun 22, 2009
237
0
For some odd reason a UIImageView doesn't respond to when I touch it. Heres what I mean:

Code:
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
	
	//imageview and maskimage are UIImageViews
      

//and for some reason this works...
    if ([touch view]==maskimage) {
		
		CGPoint location = [touch locationInView:self.view];
        
		maskimage.center=location;
		return;
		
    }

//Yet this doesn't
if ([touch view]==imageview) {
		
		CGPoint location = [touch locationInView:self.view];
        imageview.center = location;
		
		return;
		 }
	
}
So thats my dilemma. UserInteractionEnabled is on for both of the images. Any advice is greatly appreciated!
 
I found what the problem was! I never called the size for the ImageView when I created it, so the frame was completely off.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.