回答編集履歴

1

destination

2017/10/23 04:00

投稿

fuzzball
fuzzball

スコア16731

test CHANGED
@@ -11,3 +11,43 @@
11
11
 
12
12
 
13
13
  を呼んでセルの選択を解除しているようなので、`prepare(for:sender:)`の中の`self.tableView.indexPathForSelectedRow`で選択中のセルを取得できていないのではないのでしょうか?
14
+
15
+
16
+
17
+ 【追記】
18
+
19
+
20
+
21
+ ```swift
22
+
23
+ if let navi = segue.destination as? UINavigationController,
24
+
25
+ //※この中に処理が来ていないのでは?
26
+
27
+ let fVC = navi.viewControllers.first as? ViewController {
28
+
29
+ fVC.data = cellData.1
30
+
31
+ fVC.received = result
32
+
33
+ }
34
+
35
+ ```
36
+
37
+
38
+
39
+ 上記コメント位置に処理が来ていないようであれば、下記のように書き換えて試してみて下さい。
40
+
41
+
42
+
43
+ ```swift
44
+
45
+ if let vc = segue.destination as? ViewController {
46
+
47
+ vc.data = cellData.1
48
+
49
+ vc.received = result
50
+
51
+ }
52
+
53
+ ```