Showing
3 changed files
with
9 additions
and
2 deletions
No preview for this file type
| ... | @@ -17,6 +17,7 @@ protocol MyRewardsOffersScrollTableViewCellDelegate: AnyObject { | ... | @@ -17,6 +17,7 @@ protocol MyRewardsOffersScrollTableViewCellDelegate: AnyObject { |
| 17 | @IBOutlet weak var allButtonLabel: UILabel! | 17 | @IBOutlet weak var allButtonLabel: UILabel! |
| 18 | @IBOutlet weak var collectionView: UICollectionView! | 18 | @IBOutlet weak var collectionView: UICollectionView! |
| 19 | @IBOutlet weak var collectionViewHeightConstraint: NSLayoutConstraint! | 19 | @IBOutlet weak var collectionViewHeightConstraint: NSLayoutConstraint! |
| 20 | + @IBOutlet weak var collectionViewBottom: NSLayoutConstraint! | ||
| 20 | 21 | ||
| 21 | weak var delegate: MyRewardsOffersScrollTableViewCellDelegate? | 22 | weak var delegate: MyRewardsOffersScrollTableViewCellDelegate? |
| 22 | var data: SectionModel? | 23 | var data: SectionModel? |
| ... | @@ -75,8 +76,14 @@ protocol MyRewardsOffersScrollTableViewCellDelegate: AnyObject { | ... | @@ -75,8 +76,14 @@ protocol MyRewardsOffersScrollTableViewCellDelegate: AnyObject { |
| 75 | // Configure the view for the selected state | 76 | // Configure the view for the selected state |
| 76 | } | 77 | } |
| 77 | 78 | ||
| 78 | - func configureCell(data: SectionModel?) { | 79 | + func configureCell(data: SectionModel?, isInProfile: Bool? = false) { |
| 79 | self.data = data | 80 | self.data = data |
| 81 | + | ||
| 82 | + if (isInProfile ?? false) { | ||
| 83 | + collectionViewBottom.constant = 40 | ||
| 84 | + } else { | ||
| 85 | + collectionViewBottom.constant = 0 | ||
| 86 | + } | ||
| 80 | 87 | ||
| 81 | // Update collection view height based on section | 88 | // Update collection view height based on section |
| 82 | if data?.title == "Αγαπημένα" { | 89 | if data?.title == "Αγαπημένα" { | ... | ... |
| ... | @@ -306,7 +306,7 @@ extension ProfileViewController: UITableViewDelegate, UITableViewDataSource { | ... | @@ -306,7 +306,7 @@ extension ProfileViewController: UITableViewDelegate, UITableViewDataSource { |
| 306 | let cell = tableView.dequeueReusableCell(withIdentifier: "MyRewardsOffersScrollTableViewCell", for: indexPath) as! MyRewardsOffersScrollTableViewCell | 306 | let cell = tableView.dequeueReusableCell(withIdentifier: "MyRewardsOffersScrollTableViewCell", for: indexPath) as! MyRewardsOffersScrollTableViewCell |
| 307 | 307 | ||
| 308 | cell.delegate = self // Set the offers delegate | 308 | cell.delegate = self // Set the offers delegate |
| 309 | - cell.configureCell(data: self.forYouOffersSection) | 309 | + cell.configureCell(data: self.forYouOffersSection, isInProfile: true) |
| 310 | 310 | ||
| 311 | return cell | 311 | return cell |
| 312 | 312 | ... | ... |
-
Please register or login to post a comment