0

I am trying to get events from the markers on the map. Here's some of the code inside the MainViewController that holds mapView.

UIImage* labelView = [self snapshotImage:theView];
UIImageView *imageView=[[UIImageView alloc]initWithImage:labelView];
CGRect rect=CGRectMake(0,0,imageView.image.size.width,imageView.image.size.height);
MyRMView *myrm = [[MyRMView alloc]initWithFrame:rect];

UIButton *sens = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[sens addTarget:self 
           action:@selector(DoSomething:)
 forControlEvents:UIControlEventTouchUpInside];
sens.frame = rect;

[myrm addSubview:imageView];
[myrm addSubview:sens];
MyRMMarker* newMarker = [[MyRMMarker alloc] initWithUIImage:nil anchorPoint:CGPointMake(0.0, 1.0)];
newMarker.label = myrm;

MyRMMarker inherits from RMMarker which in turn inherits from CALayer. the label property is a UIView essentially.

Problem is, I am not getting any signals from DoSomething.

Any help will be appreciated alot.
Thanks!

Ted
  • 3,805
  • 14
  • 56
  • 98

1 Answers1

0

Solved:

https://github.com/dguerri/route-me/commit/8dc751724a2b231c2b26dde93c94bd607509da27#L1R192

This contains all missing code from RouteMe.

Ted
  • 3,805
  • 14
  • 56
  • 98