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

質問編集履歴

2

エラー

2018/08/31 02:50

投稿

nekokichi
nekokichi

スコア54

title CHANGED
File without changes
body CHANGED
@@ -123,6 +123,7 @@
123
123
  if UserDefaults.standard.object(forKey: "TodoList") != nil {
124
124
  cell_array = UserDefaults.standard.object(forKey: "TodoList") as! [String]
125
125
  }
126
+ tableView.reloadDate() ←エラーが出ます。 //Ambiguous reference to member 'tableView(_:numberOfRowsInSection:)'
126
127
  }
127
128
 
128
129
  ```

1

色々

2018/08/31 02:50

投稿

nekokichi
nekokichi

スコア54

title CHANGED
File without changes
body CHANGED
@@ -100,4 +100,29 @@
100
100
 
101
101
  }
102
102
 
103
+ ```
104
+
105
+
106
+
107
+ 「追記」
108
+ 1、これでよろしいでしょうか?
109
+
110
+
111
+ ```ViewController
112
+ override func viewDidLoad() {
113
+ super.viewDidLoad()
114
+ // Do any additional setup after loading the view, typically from a nib.
115
+ // //UDに保存された中身を受け取る
116
+ // if UserDefaults.standard.object(forKey: "TodoList") != nil {
117
+ // cell_array = UserDefaults.standard.object(forKey: "TodoList") as! [String]
118
+ // }
119
+ }
120
+
121
+ override func viewWillAppear(_ animated: Bool) {
122
+ //UDに保存された中身を受け取る
123
+ if UserDefaults.standard.object(forKey: "TodoList") != nil {
124
+ cell_array = UserDefaults.standard.object(forKey: "TodoList") as! [String]
125
+ }
126
+ }
127
+
103
128
  ```