views:

15

answers:

0

I am trying to subclass a MKMapView in order to capture the UIResponder events for additional processing. I find that the subclass's overriding methods are not being triggered though. Is there something basic that I am missing with this implementation? initWithFrame is called in the subclass just fine.

In the header:

@class MyMapView;
@interface MyMapView : MKMapView
{   
}
- (id)initWithFrame:(CGRect)frame;
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
@end

In the source:

@implementation MyMapView

- (id)initWithFrame:(CGRect)frame;
{
    return [super initWithFrame:frame];
}


- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    [super touchesBegan:touches withEvent:event];
}

@end