Adding subview on the top of annotation callout - ios

In the showcallout part that is placeholder for address, title subtitle in annotations, is there a way to add subview? What I want is to put small rectangle on the top of this box(callout).

check this app - https://github.com/akshay1188/CustomAnnotation

Related

ios UITextView not appearing on map

I'm adding a simple UITextView on top of a GMSMapView.
If you look at the text box, you can see that it's on top of the map.
Additionally, the UITextView is directly linked to the text view on the UI - has circle icon (o).
With this setup, I would expect the app to show something on the screen, but it's not apparently visible at all - see second image.
Resulting map without visible UITextView:
My constraints:
What am I missing here?
add the UITextView to mainView not the google map view, change the order should fix it
-- UIVIew
-- UItextView
-- Map View

Show pins on Image view in ios

I want to add a pin on UIImageView at particular coordinates in ios. I am not using mapkit. I have to do it on imageview. example picture is attached.
Please help me in this issue.
I have a simple solution, you can try it.
Every pin is a UIButton with "pin" image. You can add a pin at particular location in UIImageView by using frame or autolayout.
To show the windowview on top of pin, you can add action to each pin and detect pin by add tag or by another property.

Making clickable area larger on MKAnnotation

I'm making a custom MKAnnotation where I return a UIButton. My question is if there's any way to make the clickable area of that UIButton larger than the actual button? I've tried adding the button to a larger UIView with a tapGestureRecognizer, but it dosen't seem that the gestureRecognizer is ever called.Any thoughts?
Edit:
To clarify: It is the annotation "pin" which is custom, not the "pop-up-view". I want the user to easily be able to hit the pin :-)

Custom MKAnnotationView, how to prevent selection when shadow touched

I have got a MapView with some custom MKAnnotation, MKAnnotationView which I use to create nice custom callout.
Anyway, for my main Annotation Pin, I use some nice image of pins with a pre-rendered shadow on their left.
However, I would like the annotation not to get selected when the user touch its shadow. Because when their are a lot of them, the shadow of one can overlap another, and the wrong one gets selected because the shadow gets touched.
I have tried to use a separate image for the shadow and put it in a UIImageView inside the MKAnnotationView but it does not change anything, even if I put enableUserInteraction = NO.
any idea?
Make your MKAnnotationView the size of the image excluding the shadow. Change it's frame so that it encompasses the part you want it to receive touch. The shadow should exceed this frame, but shouldn't be cut off.

Add a button to MapKit callout at bottom center (not accessory)

I have an interesting challenge. I need to create a callout for an MKAnnotation that has a slightly custom look on my map. It has a right accessory view, but it also requires a button in the bottom center of the callout.
Is there a way to create a button and place it on the callout or is it possible to move the location of the left accessory so that it is in bottom center?
Use MKAnnotationView, as you've tagged in your question. Loads of resources and info if you search - this post seems like a good start to making a custom callout. You'll be able to add the changes to the look as you outline in your question.
If you want to change any aspect of the look and behaviour of the map callout you will need to provide a custom implementation.

Resources