質問編集履歴
2
試したことの記述を更新致しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -164,20 +164,12 @@
|
|
164
164
|
|
165
165
|
### 試したこと
|
166
166
|
①collectionViewを記入し、その候補内から、選択、記載。本来であれば、collectionViewだけで良いと思うのですが・・・
|
167
|
+

|
168
|
+
↑の中から選択しても、エラーになってしまいます。
|
169
|
+
[collectionview]単体で選ぶことはできないのでしょうか。
|
167
170
|
|
168
|
-
パターン1:UICollectionViewを選択。
|
169
|
-
collectionView(collectionView: UICollectionView, cellForItemAt: IndexPath)
|
170
|
-
下記エラーが表示
|
171
|
-
Initializer for conditional binding must have Optional type, not 'UICollectionViewCell'
|
172
|
-
|
173
|
-
パターン2:CollectionViewで選択したセル情報を指定するため、下記を選択。
|
174
|
-
self.collectionView(collectionView:UICollectionView, didSelectItemAt: IndexPath)
|
175
|
-
下記エラーが表示
|
176
|
-
Argument labels '(collectionView:, didSelectItemAt:)' do not match any available overloads
|
177
|
-
そのほかにもBool型、Int型のCollectionViewの選択肢を選びましたが、どれもうまく行きませんでした。
|
178
|
-
そもそも、collectionViewは関数などではなく、値を持つだけなので、collectionViewと、選択できて然るべきだと思うのですが、そのような選択肢は存在しませんでした。
|
179
171
|
②func inputViewControllerDone(_ controller:InputViewController)の記述を変更
|
180
172
|
(_ controller:InputViewController)の後ろに、collectionView:UICollectionView,cellForItemAt indexPath: IndexPath を追加。
|
181
|
-
そもそも
|
173
|
+
そもそもデリゲートしてきたものになるので、そのような記載は不可と書かれてしまいました。
|
182
174
|
以上、皆様のお力添えを頂けますと大変助かります。
|
183
175
|
何卒宜しくお願い申し上げます。
|
1
タイトルをわかりやすくしました。
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
collectionViewにて、 TableViewでの、indexPathForSelectedRowに対応する記述を知りたい
|
1
|
+
「Swift4.2」collectionViewにて、 TableViewでの、indexPathForSelectedRowに対応する記述を知りたい
|
body
CHANGED
File without changes
|