Unverified Commit 1568ca1f authored by ASAHI OCEAN's avatar ASAHI OCEAN Committed by GitHub
Browse files

Merge pull request #19 from asahiocean/develop

Develop
parents cb930a83 8d6cee27
......@@ -10,8 +10,8 @@ class ViewController: UIViewController {
weak var mainButton: UIButton!
weak var clearButton: UIButton!
var buttonKVO: NSKeyValueObservation!
var pinsKVO: NSKeyValueObservation!
internal var buttonKVO: NSKeyValueObservation!
internal var pinsKVO: NSKeyValueObservation!
override func viewDidLoad() {
super.viewDidLoad()
......
import UIKit
protocol ModelDelegate: class {
protocol ModelDelegate: AnyObject {
func deselectPin(pin: PinAnnotation)
func modelButtonExecute(sender: UIButton)
}
......@@ -31,11 +31,11 @@ protocol ModelDelegate: class {
selectedPinsKVO = observe(\.selected, options: .new, changeHandler: { [self] model, change in
guard let newValue = change.newValue else { return }
if newValue != nil {
guard mainButton?.tag == Model.buttonTag.start.rawValue ||
mainButton?.tag == Model.buttonTag.finish.rawValue else { return }
guard mainButton?.tag == buttonTag.start.rawValue ||
mainButton?.tag == buttonTag.finish.rawValue else { return }
mainButton?.setTitle("OK", for: .normal)
} else {
guard mainButton?.tag != Model.buttonTag.routecalc.rawValue else { return }
guard mainButton?.tag != buttonTag.routecalc.rawValue else { return }
mainButton?.setTitle(mainButtonTitle, for: .normal)
}
})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment