teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

追加

2020/08/27 09:11

投稿

sunglass
sunglass

スコア303

title CHANGED
File without changes
body CHANGED
@@ -31,4 +31,46 @@
31
31
  ![イメージ説明](d7f6708a0fb33248e5583b7115ec0140.png)
32
32
  Kind:Show(e.g.Push)設定画像
33
33
 
34
- 現在ミニマムで再現中です。
34
+ 現在ミニマムで再現中です。
35
+
36
+ ミニマムだと再現できました。。
37
+ NavigationControllerを後付けだと上手くいかないのでしょうか・・・?
38
+ Stroyboard上に出てくるNavigationbarとBackボタンが自分のプロジェクト上には表示されていません。。
39
+ ```ここに言語を入力
40
+ import UIKit
41
+
42
+ class TestViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
43
+
44
+ @IBOutlet weak var tableView: UITableView!
45
+
46
+ let TODO = ["牛乳を買う", "掃除をする", "アプリ開発の勉強をする"]
47
+
48
+ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
49
+ return TODO.count
50
+ }
51
+
52
+ func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
53
+ // セルを取得する
54
+ let cell: UITableViewCell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
55
+ // セルに表示する値を設定する
56
+ cell.textLabel!.text = TODO[indexPath.row]
57
+ return cell
58
+ }
59
+
60
+ func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
61
+
62
+ // セルの選択を解除
63
+ tableView.deselectRow(at: indexPath, animated: true)
64
+
65
+ // 次の画面へ
66
+ performSegue(withIdentifier: "toNext", sender: indexPath.row)
67
+ }
68
+
69
+
70
+ override func viewDidLoad() {
71
+ super.viewDidLoad()
72
+
73
+ }
74
+ }
75
+
76
+ ```

1

追加

2020/08/27 09:11

投稿

sunglass
sunglass

スコア303

title CHANGED
File without changes
body CHANGED
@@ -23,4 +23,12 @@
23
23
  ・・・としたところ通常のモーダル遷移のままでした。
24
24
  プッシュ遷移の実装方法が知りたいです。
25
25
 
26
- 詳しいよろしくお願いします。
26
+ 詳しいよろしくお願いします。
27
+
28
+ ![イメージ説明](4e9b0de49da09de0af16286b9596978d.png)
29
+ Storyboardのイメージ画像追加
30
+
31
+ ![イメージ説明](d7f6708a0fb33248e5583b7115ec0140.png)
32
+ Kind:Show(e.g.Push)設定画像
33
+
34
+ 現在ミニマムで再現中です。