RouteMe标记

时间:2012-06-25 08:15:24

标签: ios map route-me

我正在尝试从地图上的标记中获取事件。 以下是MainViewController中包含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继承自RMMarkerCALayer继承自labelDoSomething属性本质上是一个UIView。

问题是,我没有收到来自{{1}}的任何信号。

任何帮助都将受到赞赏 谢谢!

1 个答案:

答案 0 :(得分:0)

解决了:

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

这包含来自RouteMe的所有缺失代码。