Showing
3 changed files
with
4 additions
and
5 deletions
No preview for this file type
| ... | @@ -19,6 +19,7 @@ public class MyRewardsOffersScrollTableViewCell: UITableViewCell { | ... | @@ -19,6 +19,7 @@ public class MyRewardsOffersScrollTableViewCell: UITableViewCell { |
| 19 | @IBOutlet weak var allButtonView: UIView! | 19 | @IBOutlet weak var allButtonView: UIView! |
| 20 | @IBOutlet weak var allButtonLabel: UILabel! | 20 | @IBOutlet weak var allButtonLabel: UILabel! |
| 21 | @IBOutlet weak var allButtonArrowImage: UIImageView! | 21 | @IBOutlet weak var allButtonArrowImage: UIImageView! |
| 22 | + @IBOutlet weak var allButton: UIButton! | ||
| 22 | @IBOutlet weak var collectionView: UICollectionView! | 23 | @IBOutlet weak var collectionView: UICollectionView! |
| 23 | @IBOutlet weak var collectionViewHeightConstraint: NSLayoutConstraint! | 24 | @IBOutlet weak var collectionViewHeightConstraint: NSLayoutConstraint! |
| 24 | @IBOutlet weak var collectionViewBottom: NSLayoutConstraint! | 25 | @IBOutlet weak var collectionViewBottom: NSLayoutConstraint! |
| ... | @@ -38,10 +39,7 @@ public class MyRewardsOffersScrollTableViewCell: UITableViewCell { | ... | @@ -38,10 +39,7 @@ public class MyRewardsOffersScrollTableViewCell: UITableViewCell { |
| 38 | allButtonLabel.frame.size.width = allButtonLabel.intrinsicContentSize.width | 39 | allButtonLabel.frame.size.width = allButtonLabel.intrinsicContentSize.width |
| 39 | allButtonLabel.frame.size.height = allButtonLabel.intrinsicContentSize.height | 40 | allButtonLabel.frame.size.height = allButtonLabel.intrinsicContentSize.height |
| 40 | 41 | ||
| 41 | - // Add tap gesture to allButtonView | 42 | + allButton.addTarget(self, action: #selector(allButtonPressed), for: .touchUpInside) |
| 42 | - let tapGesture = UITapGestureRecognizer(target: self, action: #selector(allButtonTapped)) | ||
| 43 | - allButtonView.isUserInteractionEnabled = true | ||
| 44 | - allButtonView.addGestureRecognizer(tapGesture) | ||
| 45 | 43 | ||
| 46 | // UPDATED: Safe XIB registration for collection view cells | 44 | // UPDATED: Safe XIB registration for collection view cells |
| 47 | registerCollectionViewCells() | 45 | registerCollectionViewCells() |
| ... | @@ -57,7 +55,7 @@ public class MyRewardsOffersScrollTableViewCell: UITableViewCell { | ... | @@ -57,7 +55,7 @@ public class MyRewardsOffersScrollTableViewCell: UITableViewCell { |
| 57 | collectionView.dataSource = self | 55 | collectionView.dataSource = self |
| 58 | } | 56 | } |
| 59 | 57 | ||
| 60 | - @objc private func allButtonTapped() { | 58 | + @objc private func allButtonPressed() { |
| 61 | guard let data = data else { return } | 59 | guard let data = data else { return } |
| 62 | delegate?.didSelectAllOffers(data) | 60 | delegate?.didSelectAllOffers(data) |
| 63 | } | 61 | } | ... | ... |
| ... | @@ -120,6 +120,7 @@ | ... | @@ -120,6 +120,7 @@ |
| 120 | <viewLayoutGuide key="safeArea" id="njF-e1-oar"/> | 120 | <viewLayoutGuide key="safeArea" id="njF-e1-oar"/> |
| 121 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | 121 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
| 122 | <connections> | 122 | <connections> |
| 123 | + <outlet property="allButton" destination="3xd-DO-x7D" id="5HH-Ta-SAQ"/> | ||
| 123 | <outlet property="allButtonArrowImage" destination="ScT-dl-H7N" id="nMs-HW-P4D"/> | 124 | <outlet property="allButtonArrowImage" destination="ScT-dl-H7N" id="nMs-HW-P4D"/> |
| 124 | <outlet property="allButtonLabel" destination="KGA-M6-mox" id="34J-92-2Fb"/> | 125 | <outlet property="allButtonLabel" destination="KGA-M6-mox" id="34J-92-2Fb"/> |
| 125 | <outlet property="allButtonView" destination="9Qp-M4-KdO" id="dwb-fV-WAm"/> | 126 | <outlet property="allButtonView" destination="9Qp-M4-KdO" id="dwb-fV-WAm"/> | ... | ... |
-
Please register or login to post a comment