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

99miles

macrumors member
Original poster
touchesBegan is not getting called when I expect it to.

In my viewcontroller I have:
Code:
- (void)loadView {
	statsView		= [[StatsView alloc] initWithFrame:CGRectMake(14, 55, 292, 371)];	

	self.view = statsView;
	[statsView release];
}
Then in statsView I load an image:

Code:
NSString *bgImageString	= [[NSBundle mainBundle] pathForResource:@"prefs_colored_bg" ofType:@"png"];
UIImage* bgImage = [[UIImage alloc] initWithContentsOfFile:bgImageString];
UIImageView *bgImageView	= [[UIImageView alloc] initWithImage: bgImage];
[bgImage release];
frame.origin.x = 0;
frame.origin.y = 0;
bgImageView.frame		= frame;
[self addSubview:bgImageView];
[bgImageView release];
When I touch the image, touchesBegan is not getting called. Why would that be?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.