Skip to content
This repository has been archived by the owner on Nov 5, 2020. It is now read-only.

Annotation place and touch problem #18

Open
codaman opened this issue Oct 15, 2018 · 5 comments
Open

Annotation place and touch problem #18

codaman opened this issue Oct 15, 2018 · 5 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@codaman
Copy link

codaman commented Oct 15, 2018

When annotation is near the edges, calloutView half of part shows out of map

and another problem, when tapping the button on calloutView, annotation under view is clicked

@okhanokbay
Copy link
Owner

For the first one, can you please give some more details? I can't reproduce. It works fine for me.

The second one, should be ok after you increase width and height of your button.

@codaman
Copy link
Author

codaman commented Oct 17, 2018

When touching inside of annotation, annotation closing.Also i tested some users.I think calloutView should be closed touching outside of annotation.

I fixed first problem, my map is not large enough for calloutView. There is no problem with smaller calloutView

@okhanokbay
Copy link
Owner

When touching inside of annotation, annotation closing.Also i tested some users.I think calloutView should be closed touching outside of annotation.

Can you please tell about it more? I couldn't understand the problem.

@yperbasis
Copy link

I concur with codaman. The problem is that callout is dismissed when tapped on, but outside of an active control such as UIButton. A hacky solution is to add an empty interceptor button above all non-control subviews and below all control ones (buttons) of your custom callow. However, a better solution would be to override hitTest or something in CalloutAndAnchorView or CalloutViewPlus to prevent the dismissals. Check out "Adding Interactivity to our Custom Callout" at https://digitalleaves.com/blog/2016/12/building-the-perfect-ios-map-ii-completely-custom-annotation-views/

@okhanokbay
Copy link
Owner

Overriding hitTest is already being done, thus the buttons inside callout view are responding to touch events. It can be improved to include MKAnnotationView type in one of the future versions.

@okhanokbay okhanokbay added the enhancement New feature or request label Oct 25, 2018
@okhanokbay okhanokbay added this to the 0.2.0 milestone Dec 7, 2019
@okhanokbay okhanokbay self-assigned this Dec 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants