I just declare the development of the iPhone and it seems I canβt find the answer I'm looking for, what I want to do.
It seems I should be able to programmatically create a UIImageView and then set up an event handler for its touch functions.
in c # i will have something similar to
Button b = new button (); b.Click + = code of my handler
right now i have it
CGRect myImageRect = CGRectMake(0.0f, 0.0f, 141.0f, 151.0f);
UIImageView *myImage = [[UIImageView alloc] initWithFrame:myImageRect];
myImage.userInteractionEnabled = YES;
[myImage setImage:[UIImage imageNamed:@"myImage.png"]];
myImage.opaque = YES;
[self.view addSubview:myImage];
[myImage release];
What do I need to do to override touch events?
thank
source
share