質問編集履歴

2

コンソールに状況を出力してみました。

2020/04/21 06:57

投稿

nerianighthawk
nerianighthawk

スコア544

test CHANGED
File without changes
test CHANGED
@@ -109,3 +109,57 @@
109
109
  TableView の紐付けは以下の通りになっております。
110
110
 
111
111
  ![TableView紐付け](50a204db3b0a8f9f9836ed36a16e6e8c.png)
112
+
113
+
114
+
115
+ コンソールに状況を出力してみました
116
+
117
+ ```swift
118
+
119
+ override func viewDidLoad() {
120
+
121
+ super.viewDidLoad()
122
+
123
+ callAPI()
124
+
125
+
126
+
127
+ print("tableView: (String(describing: tableView))")
128
+
129
+ print("tableView.delegate: (String(describing: tableView.delegate))")
130
+
131
+ print("tableView.dataSource: (String(describing: tableView.dataSource))")
132
+
133
+ }
134
+
135
+
136
+
137
+ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
138
+
139
+ print("numberOfRowsInSection")
140
+
141
+ return 1
142
+
143
+ }
144
+
145
+ ```
146
+
147
+ 結果は以下の通りです。
148
+
149
+ ```
150
+
151
+ tableView: Optional(<UITableView: 0x7fcb44879e00; frame = (0 88; 414 774); clipsToBounds = YES; autoresize = RM+BM; gestureRecognizers = <NSArray: 0x6000004d3690>; layer = <CALayer: 0x600000ad5f40>; contentOffset: {0, 0}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}; dataSource: <breeding_recoder.RecordTableController: 0x7fcb42f06930>>)
152
+
153
+ tableView.delegate: Optional(<breeding_recoder.RecordTableController: 0x7fcb42f06930>)
154
+
155
+ tableView.dataSource: Optional(<breeding_recoder.RecordTableController: 0x7fcb42f06930>)
156
+
157
+ numberOfRowsInSection
158
+
159
+ numberOfRowsInSection
160
+
161
+ numberOfRowsInSection
162
+
163
+ numberOfRowsInSection
164
+
165
+ ```

1

TableViewの紐付けについて画像を載せました。

2020/04/21 06:57

投稿

nerianighthawk
nerianighthawk

スコア544

test CHANGED
File without changes
test CHANGED
@@ -97,3 +97,15 @@
97
97
  Swift:5.2.2
98
98
 
99
99
  Xcode:11.4.1
100
+
101
+
102
+
103
+ ### 追記
104
+
105
+
106
+
107
+ 4/21追記
108
+
109
+ TableView の紐付けは以下の通りになっております。
110
+
111
+ ![TableView紐付け](50a204db3b0a8f9f9836ed36a16e6e8c.png)