Manos Chorianopoulos

MyRewardsOffersScrollTableViewCell fix

......@@ -19,6 +19,7 @@ public class MyRewardsOffersScrollTableViewCell: UITableViewCell {
@IBOutlet weak var allButtonView: UIView!
@IBOutlet weak var allButtonLabel: UILabel!
@IBOutlet weak var allButtonArrowImage: UIImageView!
@IBOutlet weak var allButton: UIButton!
@IBOutlet weak var collectionView: UICollectionView!
@IBOutlet weak var collectionViewHeightConstraint: NSLayoutConstraint!
@IBOutlet weak var collectionViewBottom: NSLayoutConstraint!
......@@ -37,11 +38,8 @@ public class MyRewardsOffersScrollTableViewCell: UITableViewCell {
allButtonLabel.textColor = UIColor(rgb: 0x004E6E)
allButtonLabel.frame.size.width = allButtonLabel.intrinsicContentSize.width
allButtonLabel.frame.size.height = allButtonLabel.intrinsicContentSize.height
// Add tap gesture to allButtonView
let tapGesture = UITapGestureRecognizer(target: self, action: #selector(allButtonTapped))
allButtonView.isUserInteractionEnabled = true
allButtonView.addGestureRecognizer(tapGesture)
allButton.addTarget(self, action: #selector(allButtonPressed), for: .touchUpInside)
// UPDATED: Safe XIB registration for collection view cells
registerCollectionViewCells()
......@@ -57,7 +55,7 @@ public class MyRewardsOffersScrollTableViewCell: UITableViewCell {
collectionView.dataSource = self
}
@objc private func allButtonTapped() {
@objc private func allButtonPressed() {
guard let data = data else { return }
delegate?.didSelectAllOffers(data)
}
......
......@@ -120,6 +120,7 @@
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="allButton" destination="3xd-DO-x7D" id="5HH-Ta-SAQ"/>
<outlet property="allButtonArrowImage" destination="ScT-dl-H7N" id="nMs-HW-P4D"/>
<outlet property="allButtonLabel" destination="KGA-M6-mox" id="34J-92-2Fb"/>
<outlet property="allButtonView" destination="9Qp-M4-KdO" id="dwb-fV-WAm"/>
......