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

MapViewController Refactoring #195

Merged
merged 6 commits into from
Nov 22, 2019

Conversation

lennet
Copy link
Member

@lennet lennet commented Nov 16, 2019

I moved Annotation specific logic out of MapViewController into its own controller as the current MapView infrastructure becomes hard to maintain if we add more logic to it in the future.

If we wanna add more annotationTypes (Friends, events etc), we'll just need to create a new AnnotationController subclass and add that to private lazy var annotationController: [AnnotationController] and the rest should work out of the box

@lennet lennet requested a review from a team as a code owner November 16, 2019 17:10
Copy link
Member

@mltbnz mltbnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Left a comment about my favourite topic ;)


private func display(locations: [String: Location]) {
guard LocationManager.accessPermission == .authorized else {
return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe you can log a message here

}

extension MKMapView {
func register<T: MKAnnotationView>(annotationViewType: T.Type) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

CriticalMass/UIView+Autolayout.swift Outdated Show resolved Hide resolved
@lennet lennet merged commit cf1444e into criticalmaps:master Nov 22, 2019
@lennet lennet deleted the MapViewControllerRefactoring branch November 22, 2019 18:14
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

Successfully merging this pull request may close these issues.

2 participants