Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapView: viewFor: MKAnnotation not getting called #36

Closed
jbmaxwell opened this issue Aug 21, 2018 · 3 comments
Closed

mapView: viewFor: MKAnnotation not getting called #36

jbmaxwell opened this issue Aug 21, 2018 · 3 comments

Comments

@jbmaxwell
Copy link

jbmaxwell commented Aug 21, 2018

It seems that (_ mapView: MKMapView viewFor: MKAnnotation) -> MKAnnotationView? isn't implemented, but I'm also noticing that it isn't getting called on my viewController. I realize this may not be a problem in RxMKMapView, but any theories as to why it's not getting called in my case? Several other RxMKMapView delegate methods (e.g., regionDidChangeAnimated) are getting called, as expected.

@freak4pc
Copy link
Member

Hey - Seems like the example project does this and it works, please look at the code there and try out :) If it works there and specifically doesn't work for you, this isn't really a bug with the repo.

https://github.com/RxSwiftCommunity/RxMKMapView/blob/master/Example/RxMKMapView/ViewController.swift#L152

@freak4pc
Copy link
Member

Are you setting a forward delegate though?

// Install a forwarding delegate so we can use Rx Delegate Proxy
// alongside our regular imperative delegate
mapView.rx
.setDelegate(self)
.disposed(by: disposeBag)

@jbmaxwell
Copy link
Author

Ha! Wow, that is so bizarre. I don't know how many times I looked at that and didn't see the setDelegate... ugh. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants