route-meフレームワークとマーカーラベルに問題があります。私は今、運がないまま約5時間試していますが、これについてWeb上のほぼすべてのフォーラムトピックを検索しました。UIButtonTypeDetailDisclosure-Buttonが付いたマーカーラベルを追加したいと思います。ラベルであるはずのUIViewにボタンを追加すると、ボタンをクリックできなくなります。
私のコードは次のとおりです。
- (void)tapOnMarker:(RMMarker*)marker onMap:(RMMapView*)map {
UIView *frame = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 50, 50)];
UIButton *button = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
button.frame = CGRectMake(0, 0, 34, 34);
button.enabled = YES;
button.userInteractionEnabled = YES;
[button addTarget:self action:@selector(markerLabelButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
[frame addSubview:button];
[marker setLabel:frame];
[marker showLabel];
}
-(void)markerLabelButtonPressed:(id)sender {
NSLog(@"pressed");
}
誰かがこれを手伝ってくれることを願っています。ありがとう :)
これ以上の情報が必要な場合はお知らせください。