Button action in mkannotation view not working?

You need to set frame for this button. which is not really seen in the code. Adjust frame as you want by x position and y position.

UIButton *tembtn=[UIButton buttonWithType:UIButtonTypeCustom];

// Frame required to render on position and size. Add below line 
[tembtn setFrame:CGRectMake(0, 0, 100, 50)];

[tembtn setTitle:@"More info" forState:UIControlStateNormal];
[tembtn addTarget:self action:@selector(annotationBtnAction:)
 forControlEvents:UIControlEventTouchUpInside];
tembtn.backgroundColor=[UIColor grayColor];
[view addSubview:tembtn];

Edit:

Found the reason you can only tap on area, in which annotation is rendered.

Here is simple demo for custom call out:

Custom Callout Demo

enter image description here

Leave a Comment