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

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
okhanokbay committed Mar 10, 2018
1 parent 9aa077e commit a7bc0e2
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ class YourCalloutViewModel: CalloutViewModel {
var image: UIImage

init(title: String, image: UIImage) {
self.title = title
self.image = image
self.title = title
self.image = image
}
}
```
Expand Down Expand Up @@ -99,10 +99,10 @@ class YourCalloutView: UIView, CalloutViewPlus {
}

func configureCallout(_ viewModel: CalloutViewModel) {
let viewModel = viewModel as! YourCalloutViewModel
let viewModel = viewModel as! YourCalloutViewModel

label.text = viewModel.title
imageView.image = viewModel.image
label.text = viewModel.title
imageView.image = viewModel.image
}
}
```
Expand All @@ -119,20 +119,20 @@ class YourViewController: UIViewController {
@IBOutlet weak var mapView: MapViewPlus!

override func viewDidLoad() {
super.viewDidLoad()
super.viewDidLoad()

//Required
mapView.delegate = self
//Required
mapView.delegate = self

let viewModel = YourAnnotationViewModel(title: "Cafe", image: UIImage(named: "cafe.png")!)
let viewModel = YourAnnotationViewModel(title: "Cafe", image: UIImage(named: "cafe.png")!)

let annotation = AnnotationPlus(viewModel: viewModel,
coordinate: CLLocationCoordinate2DMake(50.11, 8.68))
let annotation = AnnotationPlus(viewModel: viewModel,
coordinate: CLLocationCoordinate2DMake(50.11, 8.68))

var annotations: [AnnotationPlus] = []
annotations.append(annotation)
var annotations: [AnnotationPlus] = []
annotations.append(annotation)

mapView.setup(withAnnotations: annotations)
mapView.setup(withAnnotations: annotations)
}
}
```
Expand Down

0 comments on commit a7bc0e2

Please sign in to comment.