The approach I've used for this in the past is to fire off a notification when a subview has been touched, with the subview as the object posted with the notification. You can then have your container view listen for the appropriate notification, and perform whatever action is needed based on the UIView instance that was selected.
You'd post the notification within the subview's -touchesEnded:withEvent:
method as follows:
[[NSNotificationCenter defaultCenter] postNotificationName:@"MySubviewWasTouched" object:self];
To set up listening for this notification, you'd place code like the following somewhere in the initialization of your view or view controller:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleSubviewTouch:) name:@"MySubviewWasTouched" object:nil];
remembering to remove the observer in your teardown code for the the view or controller.
Finally, you'd need to implement the method that processes the receipt of the notification (-handleSubviewTouch:
in the example above):
- (void)handleSubviewTouch:(NSNotification *)note;
{
UIView *subviewThatWasTouched = [note object];
// Your touch-handling logic here
}