-
Notifications
You must be signed in to change notification settings - Fork 0
/
StudyRoom4.swift
81 lines (53 loc) · 1.77 KB
/
StudyRoom4.swift
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//
// StudyRoom4.swift
// IF HACKERTHON
//
// Created by 정재근 on 10/11/2018.
// Copyright © 2018 개발하는인싸들. All rights reserved.
//
import UIKit
class StudyRoom4: UIViewController, UITextFieldDelegate {
@IBOutlet weak var lblText: UILabel!
@IBOutlet weak var lblWelcome: UILabel!
@IBOutlet weak var txttext: UITextField!
@IBAction func btnBack(_ sender: Any) {
self.dismiss(animated: true, completion: nil)
}
override func viewDidLoad() {
super.viewDidLoad()
txttext.delegate = self
}
@IBAction func btnSend(_ sender: Any) {
let answer = txttext.text
lblText.text = ""
if(answer == "가락지빵"){
lblWelcome.text = "정답입니다!!"
lblText.text = "분유"
}
if(answer == "가루젖") {
lblWelcome.text = "정답입니다!!"
lblText.text = "주스"
}
if(answer == "과일단물") {
lblWelcome.text = "정답입니다!!"
lblText.text = "달걀"
}
if(answer == "닭알") {
lblWelcome.text = "정답입니다!!"
lblText.text = "브래지어"
}
if(answer == "가슴띠") {
lblWelcome.text = "정답입니다!!"
lblText.text = "누룽지"
}
if(answer == "가마치") {
lblWelcome.text = "정답입니다!!"
lblText.text = "평영"
}
if(answer == "가슴헤염") {
lblWelcome.text = "시험이 종료되었습니다."
}
else {
}
}
}