回答編集履歴

1

追記

2020/06/29 13:36

投稿

退会済みユーザー
test CHANGED
@@ -23,3 +23,27 @@
23
23
  let question = realm.objects(Question.self)
24
24
 
25
25
  の後で、dump(question)ってやってコンソールに表示されたものを教えて下さい。
26
+
27
+
28
+
29
+ ---
30
+
31
+ 追記
32
+
33
+
34
+
35
+ ```swift
36
+
37
+ let realm = try! Realm()
38
+
39
+ let question = realm.objects(Question.self)
40
+
41
+ ShowTextView.text = question.randomElement().Create
42
+
43
+ ```
44
+
45
+ ランダムに取得するだろうから、firstとかでよくて、randomElement()いらないんじゃないかなともおもうけど念の為。
46
+
47
+
48
+
49
+ 大文字小文字にも意味があるので意識して単語の先頭文字をタイピングしてください。