ViewController.swift 813 Bytes
Newer Older
asahiocean's avatar
1  
asahiocean committed
1
import UIKit
asahiocean's avatar
asahiocean committed
2
import MapKit
asahiocean's avatar
1  
asahiocean committed
3

asahiocean's avatar
asahiocean committed
4
5
// Тестовое задание «СЗ РЦАИ» iOS Developer

asahiocean's avatar
asahiocean committed
6
7
8
9
10
11
12
13
class ViewController: UIViewController, MKMapViewDelegate, ModelDelegate {
    func deselectPin(pin: PinAnnotation) {
        
    }
    
    func modelButtonExecute(sender: UIButton) {
        
    }
asahiocean's avatar
asahiocean committed
14
15
16
17
18
19
20
21
22
    
    var mapView: MapView!
    
    /// Button for building graphs and routes
    weak var mainButton: UIButton!
    weak var clearButton: UIButton!
    
    var buttonKVO: NSKeyValueObservation!
    var pinsKVO: NSKeyValueObservation!
asahiocean's avatar
2    
asahiocean committed
23
    
asahiocean's avatar
1  
asahiocean committed
24
25
    override func viewDidLoad() {
        super.viewDidLoad()
asahiocean's avatar
asahiocean committed
26
27
28
        mapView = .init(frame: view.frame)
        mapView.delegate = self
        view.addSubview(mapView)
asahiocean's avatar
asahiocean committed
29
30
31
32
33

        mapView.model.delegate = self
        
        buttonsSetup()
        pinsKVOFunc()
asahiocean's avatar
1  
asahiocean committed
34
35
    }
}