質問編集履歴
3
補足情報
test
CHANGED
File without changes
|
test
CHANGED
@@ -26,6 +26,8 @@
|
|
26
26
|
|
27
27
|
@IBOutlet weak var tableView1: UITableView!
|
28
28
|
|
29
|
+
weak var protcol:removeDelegate?
|
30
|
+
|
29
31
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
30
32
|
|
31
33
|
|
@@ -38,6 +40,8 @@
|
|
38
40
|
|
39
41
|
cell0.delegate = self
|
40
42
|
|
43
|
+
cell0.protcol = self
|
44
|
+
|
41
45
|
return cell0
|
42
46
|
|
43
47
|
}
|
@@ -49,6 +53,8 @@
|
|
49
53
|
cell1.cellItem2 = InfoSearch[indexPath.row]
|
50
54
|
|
51
55
|
cell1.delegate = self
|
56
|
+
|
57
|
+
cell1.protcol = self
|
52
58
|
|
53
59
|
return cell1
|
54
60
|
|
2
補足情報
test
CHANGED
File without changes
|
test
CHANGED
@@ -21,6 +21,40 @@
|
|
21
21
|
```ここに言語名を入力
|
22
22
|
|
23
23
|
class ViewController: UIViewController,UITableViewDelegate,UITableViewDataSource,UIScrollViewDelegate、removeDelegate {
|
24
|
+
|
25
|
+
@IBOutlet weak var tableView0: UITableView!
|
26
|
+
|
27
|
+
@IBOutlet weak var tableView1: UITableView!
|
28
|
+
|
29
|
+
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
if tableView.tag == 0 {
|
34
|
+
|
35
|
+
if let cell0 = self.tableView0.dequeueReusableCell(withIdentifier: "FirstTableViewCell") as? FirstTableViewCell {
|
36
|
+
|
37
|
+
cell0.cellItem = Info[indexPath.row]
|
38
|
+
|
39
|
+
cell0.delegate = self
|
40
|
+
|
41
|
+
return cell0
|
42
|
+
|
43
|
+
}
|
44
|
+
|
45
|
+
}else if tableView.tag == 1 {
|
46
|
+
|
47
|
+
if let cell1 = self.tableView1.dequeueReusableCell(withIdentifier: "FirstTableViewCell") as? FirstTableViewCell {
|
48
|
+
|
49
|
+
cell1.cellItem2 = InfoSearch[indexPath.row]
|
50
|
+
|
51
|
+
cell1.delegate = self
|
52
|
+
|
53
|
+
return cell1
|
54
|
+
|
55
|
+
}
|
56
|
+
|
57
|
+
}
|
24
58
|
|
25
59
|
remove(){
|
26
60
|
|
1
補足情報を追加しました。let cell = FirstTableViewCell()
test
CHANGED
File without changes
|
test
CHANGED
@@ -86,6 +86,8 @@
|
|
86
86
|
|
87
87
|
weak var protcol:removeDelegate?
|
88
88
|
|
89
|
+
let cell = FirstTableViewCell()
|
90
|
+
|
89
91
|
override func viewDidLoad() {
|
90
92
|
|
91
93
|
super.viewDidLoad()
|