| | |
| | | func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { |
| | | let item = items[indexPath.row] |
| | | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_UploadImgCCell", for: indexPath) as! UploadImgCCell |
| | | cell.indexPath = indexPath |
| | | if item is String{ |
| | | cell.btn_del.isHidden = true |
| | | cell.img_cover.image = UIImage(named: "btn_evaluate_add") |
| | | }else{ |
| | | cell.btn_del.isHidden = false |
| | | cell.img_cover.image = (item as? PHAsset)?.toImage() |
| | | } |
| | | |
| | | cell.clouse = { [weak self] index in |
| | | guard let weakSelf = self else { return } |
| | | weakSelf.items.removeObject(at: index.row) |
| | | collectionView.reloadData() |
| | | } |
| | | return cell |
| | | } |
| | |
| | | |
| | | extension SearchStoreDetailFeedbackVC:UICollectionViewDelegateFlowLayout{ |
| | | func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { |
| | | return CGSize(width: 60, height: 60) |
| | | return CGSize(width: 70, height: 80) |
| | | } |
| | | |
| | | func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { |