-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathGameOverViewController.swift
More file actions
53 lines (29 loc) · 999 Bytes
/
GameOverViewController.swift
File metadata and controls
53 lines (29 loc) · 999 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// GameOverViewController.swift
// funTyping
//
// Created by Chatchai Wangwiwattana on 2/8/17.
// Copyright © 2017 Chatchai Wangwiwattana. All rights reserved.
//
import UIKit
class GameOverViewController: UIViewController {
var gameCtrl:TypingGameController?
@IBOutlet weak var missLabel: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
self.gameCtrl = appDelegate.gameCtrl
}
override func viewWillAppear(animated: Bool) {
updateUI()
}
override func viewWillDisappear(animated: Bool) {
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
func updateUI(){
self.missLabel.text! = "You miss \(self.gameCtrl!.mistakes) times"
}
}