ViewController.swift 703 Bytes
Newer Older
asahiocean's avatar
1  
asahiocean committed
1
2
import UIKit

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

asahiocean's avatar
asahiocean committed
5
class ViewController: UIViewController {
asahiocean's avatar
asahiocean committed
6
    
asahiocean's avatar
asahiocean committed
7
    var mapView: MapView!
asahiocean's avatar
asahiocean committed
8
    internal var model = Model.shared
asahiocean's avatar
asahiocean committed
9
10
11
12
13
    
    /// Button for building graphs and routes
    weak var mainButton: UIButton!
    weak var clearButton: UIButton!
    
asahiocean's avatar
asahiocean committed
14
15
    internal var buttonKVO: NSKeyValueObservation!
    internal var pinsKVO: NSKeyValueObservation!
asahiocean's avatar
2    
asahiocean committed
16
    
asahiocean's avatar
1  
asahiocean committed
17
18
    override func viewDidLoad() {
        super.viewDidLoad()
asahiocean's avatar
asahiocean committed
19
20
21
        mapView = .init(frame: view.frame)
        mapView.delegate = self
        view.addSubview(mapView)
asahiocean's avatar
asahiocean committed
22
        
asahiocean's avatar
asahiocean committed
23
24
25
26
        mapView.model.delegate = self
        
        buttonsSetup()
        pinsKVOFunc()
asahiocean's avatar
1  
asahiocean committed
27
28
    }
}