-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNextViewController.swift
62 lines (35 loc) · 1.35 KB
/
NextViewController.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
//
// NextViewController.swift
// Swift5MapAndProtocol1
//
// Created by 野澤英二郎 on 2021/01/28.
//
import UIKit
protocol SearchLocationDelegate {
func searchLocation(idoValue:String,keidoValue:String)
}
class NextViewController: UIViewController {
@IBOutlet weak var idoTextField: UITextField!
@IBOutlet weak var keidoTextfield: UITextField!
var delegate:SearchLocationDelegate?
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
@IBAction func okAction(_ sender: Any) {
let idoValue = idoTextField.text!
let keidoValue = keidoTextfield.text!
if idoTextField.text != nil && keidoTextfield.text != nil{
delegate?.searchLocation(idoValue: idoValue, keidoValue: keidoValue)
dismiss(animated: true, completion: nil)
}
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}