質問編集履歴

1

色々

2019/02/04 11:18

投稿

nekokichi
nekokichi

スコア54

test CHANGED
File without changes
test CHANGED
@@ -35,6 +35,8 @@
35
35
  どうか、ご回答よろしくお願いします。
36
36
 
37
37
 
38
+
39
+ ```Swift
38
40
 
39
41
  import UIKit
40
42
 
@@ -112,25 +114,9 @@
112
114
 
113
115
  let imageView = cell.contentView.viewWithTag(1) as! UIImageView
114
116
 
115
- // print("indexPath.row = ", indexPath.row)
116
-
117
117
  let storageref = Storage.storage().reference(forURL: "gs://bookshare-b78b4.appspot.com").child("userID").child("Item").child(photos[indexPath.row])
118
118
 
119
119
  imageView.sd_setImage(with: storageref)
120
-
121
- // imageView.setImage(with: storageref as? Resource, placeholder: nil, options: nil, progressBlock: nil, completionHandler: nil)
122
-
123
- //画像をセット
124
-
125
- // imageView.kf.setImage(with: storageref as? Resource)
126
-
127
- // if self.photosCount - 1 == indexPath.row {
128
-
129
- // self.photos = [String]()
130
-
131
- // self.photosCount = Int()
132
-
133
- // }
134
120
 
135
121
  return cell
136
122
 
@@ -148,10 +134,6 @@
148
134
 
149
135
  ref.child("Item").observe(.value) { (snap) in
150
136
 
151
- print("---")
152
-
153
- print("-------")
154
-
155
137
  for item in snap.children {
156
138
 
157
139
  let snapdata = item as! DataSnapshot
@@ -166,28 +148,16 @@
166
148
 
167
149
  print(self.photos)
168
150
 
169
- // print(1111)
170
-
171
- // print(self.photos)
172
-
173
151
  }
174
-
175
- // self.photosCount = self.photos.count
176
152
 
177
153
  self.collectionView.reloadData()
178
154
 
179
155
  }
180
-
181
- // ref.child("Item").observeSingleEvent(of: .value) { (snap, error) in
182
-
183
- //
184
-
185
- //
186
-
187
- // }
188
156
 
189
157
  }
190
158
 
191
159
 
192
160
 
193
161
  }
162
+
163
+ ```