Manos Chorianopoulos

add ProfileVC

Showing 38 changed files with 1035 additions and 81 deletions
......@@ -7,7 +7,7 @@
<key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>1</integer>
</dict>
</dict>
</dict>
......
......@@ -7,6 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
1E116F682DE845B1009AE791 /* ProfileFilterCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1E116F672DE845B1009AE791 /* ProfileFilterCollectionViewCell.xib */; };
1E116F692DE845B1009AE791 /* ProfileFilterCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E116F662DE845B1009AE791 /* ProfileFilterCollectionViewCell.swift */; };
1E116F6B2DE86CBA009AE791 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E116F6A2DE86CAD009AE791 /* Models.swift */; };
1E4C4CFB2DE6014500279AAD /* CopyableLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E4C4CFA2DE6014500279AAD /* CopyableLabel.swift */; };
1E64E1832DE48E0600543217 /* MyRewardsOfferCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1E64E1822DE48E0600543217 /* MyRewardsOfferCollectionViewCell.xib */; };
1E64E1842DE48E0600543217 /* MyRewardsOfferCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E64E1812DE48E0600543217 /* MyRewardsOfferCollectionViewCell.swift */; };
......@@ -27,6 +30,14 @@
1EBF5F072840E13F00B8B17F /* SwiftEventBus in Frameworks */ = {isa = PBXBuildFile; productRef = 1EBF5F062840E13F00B8B17F /* SwiftEventBus */; };
1ED41E4C2DE0C24D00836ABA /* MyRewardsBannerOfferCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1ED41E4A2DE0C24D00836ABA /* MyRewardsBannerOfferCollectionViewCell.swift */; };
1ED41E4D2DE0C24D00836ABA /* MyRewardsBannerOfferCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1ED41E4B2DE0C24D00836ABA /* MyRewardsBannerOfferCollectionViewCell.xib */; };
1EDBAF042DE843CA00911E79 /* ProfileCouponTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1EDBAF032DE843CA00911E79 /* ProfileCouponTableViewCell.xib */; };
1EDBAF052DE843CA00911E79 /* ProfileCouponTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EDBAF022DE843CA00911E79 /* ProfileCouponTableViewCell.swift */; };
1EDBAF082DE843FB00911E79 /* ProfileCouponFiltersTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1EDBAF072DE843FB00911E79 /* ProfileCouponFiltersTableViewCell.xib */; };
1EDBAF092DE843FB00911E79 /* ProfileCouponFiltersTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EDBAF062DE843FB00911E79 /* ProfileCouponFiltersTableViewCell.swift */; };
1EDBAF0C2DE8441000911E79 /* ProfileQuestionnaireTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1EDBAF0B2DE8441000911E79 /* ProfileQuestionnaireTableViewCell.xib */; };
1EDBAF0D2DE8441000911E79 /* ProfileQuestionnaireTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EDBAF0A2DE8441000911E79 /* ProfileQuestionnaireTableViewCell.swift */; };
1EDBAF102DE8443B00911E79 /* ProfileHeaderTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1EDBAF0F2DE8443B00911E79 /* ProfileHeaderTableViewCell.xib */; };
1EDBAF112DE8443B00911E79 /* ProfileHeaderTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EDBAF0E2DE8443B00911E79 /* ProfileHeaderTableViewCell.swift */; };
7630AD9A6242D60846D6750C /* Pods_SwiftWarplyFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0D5F56DD4E5371A50AD2D87 /* Pods_SwiftWarplyFramework.framework */; };
A07936762885E9CC00064122 /* UIColorExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = A07936752885E9CC00064122 /* UIColorExtensions.swift */; };
E6A77853282933340045BBA8 /* SwiftWarplyFramework.docc in Sources */ = {isa = PBXBuildFile; fileRef = E6A77852282933340045BBA8 /* SwiftWarplyFramework.docc */; };
......@@ -151,6 +162,9 @@
/* Begin PBXFileReference section */
1E108A9728A3FA9B0008B8E7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
1E116F662DE845B1009AE791 /* ProfileFilterCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileFilterCollectionViewCell.swift; sourceTree = "<group>"; };
1E116F672DE845B1009AE791 /* ProfileFilterCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ProfileFilterCollectionViewCell.xib; sourceTree = "<group>"; };
1E116F6A2DE86CAD009AE791 /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = "<group>"; };
1E4C4CFA2DE6014500279AAD /* CopyableLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CopyableLabel.swift; sourceTree = "<group>"; };
1E64E1812DE48E0600543217 /* MyRewardsOfferCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyRewardsOfferCollectionViewCell.swift; sourceTree = "<group>"; };
1E64E1822DE48E0600543217 /* MyRewardsOfferCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MyRewardsOfferCollectionViewCell.xib; sourceTree = "<group>"; };
......@@ -169,6 +183,14 @@
1EB4F42A2DE0A0AF00D934C0 /* MyRewardsOffersScrollTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MyRewardsOffersScrollTableViewCell.xib; sourceTree = "<group>"; };
1ED41E4A2DE0C24D00836ABA /* MyRewardsBannerOfferCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyRewardsBannerOfferCollectionViewCell.swift; sourceTree = "<group>"; };
1ED41E4B2DE0C24D00836ABA /* MyRewardsBannerOfferCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MyRewardsBannerOfferCollectionViewCell.xib; sourceTree = "<group>"; };
1EDBAF022DE843CA00911E79 /* ProfileCouponTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileCouponTableViewCell.swift; sourceTree = "<group>"; };
1EDBAF032DE843CA00911E79 /* ProfileCouponTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ProfileCouponTableViewCell.xib; sourceTree = "<group>"; };
1EDBAF062DE843FB00911E79 /* ProfileCouponFiltersTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileCouponFiltersTableViewCell.swift; sourceTree = "<group>"; };
1EDBAF072DE843FB00911E79 /* ProfileCouponFiltersTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ProfileCouponFiltersTableViewCell.xib; sourceTree = "<group>"; };
1EDBAF0A2DE8441000911E79 /* ProfileQuestionnaireTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileQuestionnaireTableViewCell.swift; sourceTree = "<group>"; };
1EDBAF0B2DE8441000911E79 /* ProfileQuestionnaireTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ProfileQuestionnaireTableViewCell.xib; sourceTree = "<group>"; };
1EDBAF0E2DE8443B00911E79 /* ProfileHeaderTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileHeaderTableViewCell.swift; sourceTree = "<group>"; };
1EDBAF0F2DE8443B00911E79 /* ProfileHeaderTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ProfileHeaderTableViewCell.xib; sourceTree = "<group>"; };
A07936752885E9CC00064122 /* UIColorExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColorExtensions.swift; sourceTree = "<group>"; };
A9B7BE01A4E812DE49866EF8 /* Pods-SwiftWarplyFramework.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftWarplyFramework.debug.xcconfig"; path = "Target Support Files/Pods-SwiftWarplyFramework/Pods-SwiftWarplyFramework.debug.xcconfig"; sourceTree = "<group>"; };
B9EB8A451EF0C5AD75094EEE /* Pods-SwiftWarplyFramework.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftWarplyFramework.release.xcconfig"; path = "Target Support Files/Pods-SwiftWarplyFramework/Pods-SwiftWarplyFramework.release.xcconfig"; sourceTree = "<group>"; };
......@@ -311,6 +333,7 @@
1E00E6A22DDF71BD0012F164 /* models */ = {
isa = PBXGroup;
children = (
1E116F6A2DE86CAD009AE791 /* Models.swift */,
);
path = models;
sourceTree = "<group>";
......@@ -383,6 +406,11 @@
1EA8E5BC2DDF34FB00CD3418 /* cells */ = {
isa = PBXGroup;
children = (
1EDBAF122DE844C500911E79 /* ProfileFilterCollectionViewCell */,
1EDBAF012DE8439000911E79 /* ProfileCouponTableViewCell */,
1EDBAF002DE842A700911E79 /* ProfileCouponFiltersTableViewCell */,
1EDBAEFF2DE8420500911E79 /* ProfileQuestionnaireTableViewCell */,
1EDBAEFE2DE841CE00911E79 /* ProfileHeaderTableViewCell */,
1E64E1802DE48DD600543217 /* MyRewardsOfferCollectionViewCell */,
1ED41E492DE0C21800836ABA /* MyRewardsBannerOfferCollectionViewCell */,
1EB4F4282DE0A09500D934C0 /* MyRewardsOffersScrollTableViewCell */,
......@@ -418,6 +446,51 @@
path = MyRewardsBannerOfferCollectionViewCell;
sourceTree = "<group>";
};
1EDBAEFE2DE841CE00911E79 /* ProfileHeaderTableViewCell */ = {
isa = PBXGroup;
children = (
1EDBAF0E2DE8443B00911E79 /* ProfileHeaderTableViewCell.swift */,
1EDBAF0F2DE8443B00911E79 /* ProfileHeaderTableViewCell.xib */,
);
path = ProfileHeaderTableViewCell;
sourceTree = "<group>";
};
1EDBAEFF2DE8420500911E79 /* ProfileQuestionnaireTableViewCell */ = {
isa = PBXGroup;
children = (
1EDBAF0A2DE8441000911E79 /* ProfileQuestionnaireTableViewCell.swift */,
1EDBAF0B2DE8441000911E79 /* ProfileQuestionnaireTableViewCell.xib */,
);
path = ProfileQuestionnaireTableViewCell;
sourceTree = "<group>";
};
1EDBAF002DE842A700911E79 /* ProfileCouponFiltersTableViewCell */ = {
isa = PBXGroup;
children = (
1EDBAF062DE843FB00911E79 /* ProfileCouponFiltersTableViewCell.swift */,
1EDBAF072DE843FB00911E79 /* ProfileCouponFiltersTableViewCell.xib */,
);
path = ProfileCouponFiltersTableViewCell;
sourceTree = "<group>";
};
1EDBAF012DE8439000911E79 /* ProfileCouponTableViewCell */ = {
isa = PBXGroup;
children = (
1EDBAF022DE843CA00911E79 /* ProfileCouponTableViewCell.swift */,
1EDBAF032DE843CA00911E79 /* ProfileCouponTableViewCell.xib */,
);
path = ProfileCouponTableViewCell;
sourceTree = "<group>";
};
1EDBAF122DE844C500911E79 /* ProfileFilterCollectionViewCell */ = {
isa = PBXGroup;
children = (
1E116F662DE845B1009AE791 /* ProfileFilterCollectionViewCell.swift */,
1E116F672DE845B1009AE791 /* ProfileFilterCollectionViewCell.xib */,
);
path = ProfileFilterCollectionViewCell;
sourceTree = "<group>";
};
98AD36FA62350CEABCD961A7 /* Frameworks */ = {
isa = PBXGroup;
children = (
......@@ -833,10 +906,14 @@
1E917CD62DDF64B2002221D8 /* MyRewardsViewController.xib in Resources */,
E6A7790A282933E60045BBA8 /* warp_white_close_button.png in Resources */,
1ED41E4D2DE0C24D00836ABA /* MyRewardsBannerOfferCollectionViewCell.xib in Resources */,
1EDBAF082DE843FB00911E79 /* ProfileCouponFiltersTableViewCell.xib in Resources */,
1EDBAF042DE843CA00911E79 /* ProfileCouponTableViewCell.xib in Resources */,
E6A778F4282933E60045BBA8 /* WLNativeAdCollectionViewCell.xib in Resources */,
E6A778F3282933E60045BBA8 /* WLNativeAdTableViewCell.xib in Resources */,
1EDBAF0C2DE8441000911E79 /* ProfileQuestionnaireTableViewCell.xib in Resources */,
E6A77A38282BC3530045BBA8 /* Media.xcassets in Resources */,
E6A77905282933E60045BBA8 /* warp_white_back_button@2x.png in Resources */,
1E116F682DE845B1009AE791 /* ProfileFilterCollectionViewCell.xib in Resources */,
1EB4F4252DE09AAC00D934C0 /* MyRewardsBannerOffersScrollTableViewCell.xib in Resources */,
1EA8E5C02DDF427A00CD3418 /* PingLCG-Bold.otf in Resources */,
1E64E1832DE48E0600543217 /* MyRewardsOfferCollectionViewCell.xib in Resources */,
......@@ -844,6 +921,7 @@
1EA8E5C22DDF427A00CD3418 /* PingLCG-Regular.otf in Resources */,
E6A77908282933E60045BBA8 /* warp_white_close_button@2x.png in Resources */,
1EB4F42B2DE0A0AF00D934C0 /* MyRewardsOffersScrollTableViewCell.xib in Resources */,
1EDBAF102DE8443B00911E79 /* ProfileHeaderTableViewCell.xib in Resources */,
1E917CDB2DDF68C7002221D8 /* CouponViewController.xib in Resources */,
E6A77909282933E60045BBA8 /* warp_white_forward_button@2x.png in Resources */,
E6A77906282933E60045BBA8 /* warp_white_forward_button.png in Resources */,
......@@ -898,6 +976,8 @@
E6A77900282933E60045BBA8 /* WLInboxItemViewController.m in Sources */,
E6A7793E282933E70045BBA8 /* AFHTTPSessionManager.m in Sources */,
E6A77933282933E70045BBA8 /* UIButton+AFNetworking.m in Sources */,
1E116F692DE845B1009AE791 /* ProfileFilterCollectionViewCell.swift in Sources */,
1EDBAF0D2DE8441000911E79 /* ProfileQuestionnaireTableViewCell.swift in Sources */,
E6A77919282933E60045BBA8 /* Warply.m in Sources */,
E6A7794B282933E70045BBA8 /* FMDatabase.m in Sources */,
E6A778EC282933E60045BBA8 /* WLNativeVideoTableViewCell.m in Sources */,
......@@ -917,8 +997,10 @@
E6A77917282933E60045BBA8 /* UIViewController+WLAdditions.m in Sources */,
E6A77943282933E70045BBA8 /* AFNetworkReachabilityManager.m in Sources */,
E6A778F1282933E60045BBA8 /* WLNativeAdTableViewCell.m in Sources */,
1E116F6B2DE86CBA009AE791 /* Models.swift in Sources */,
E6A77853282933340045BBA8 /* SwiftWarplyFramework.docc in Sources */,
E6A77938282933E70045BBA8 /* AFImageDownloader.m in Sources */,
1EDBAF092DE843FB00911E79 /* ProfileCouponFiltersTableViewCell.swift in Sources */,
E6A778ED282933E60045BBA8 /* WLCustomNativeCollectionViewCell.m in Sources */,
E6A7790D282933E60045BBA8 /* WLLocationManager.m in Sources */,
E6A7793D282933E70045BBA8 /* AFURLResponseSerialization.m in Sources */,
......@@ -932,6 +1014,8 @@
1E4C4CFB2DE6014500279AAD /* CopyableLabel.swift in Sources */,
E6A77947282933E70045BBA8 /* FMDatabaseQueue.m in Sources */,
E6A77922282933E60045BBA8 /* NSData+SSToolkitAdditions.m in Sources */,
1EDBAF112DE8443B00911E79 /* ProfileHeaderTableViewCell.swift in Sources */,
1EDBAF052DE843CA00911E79 /* ProfileCouponTableViewCell.swift in Sources */,
E6A7794A282933E70045BBA8 /* FMDatabaseAdditions.m in Sources */,
E6A77903282933E60045BBA8 /* WLAPSItem.m in Sources */,
E6A7790B282933E60045BBA8 /* WLPushManager.m in Sources */,
......
......@@ -7,7 +7,7 @@
<key>SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>0</integer>
</dict>
</dict>
</dict>
......
{
"images" : [
{
"filename" : "contest_banner_5.png",
"filename" : "questionnaire_banner.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "contest_banner_5 1.png",
"filename" : "questionnaire_banner 1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "contest_banner_5 2.png",
"filename" : "questionnaire_banner 2.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -8,7 +8,8 @@
import UIKit
protocol MyRewardsBannerOffersScrollTableViewCellDelegate: AnyObject {
func didSelectBannerOffer(_ offer: OfferModel)
func didSelectBannerOffer(_ index: Int)
func didTapProfileButton()
}
@objc public class MyRewardsBannerOffersScrollTableViewCell: UITableViewCell {
......@@ -17,6 +18,7 @@ protocol MyRewardsBannerOffersScrollTableViewCellDelegate: AnyObject {
@IBOutlet weak var tagView2: UIView!
@IBOutlet weak var tagLabel2: UILabel!
@IBOutlet weak var profileImage: UIImageView!
@IBOutlet weak var profileButton: UIButton!
@IBOutlet weak var collectionView: UICollectionView!
@IBOutlet weak var pageControl: UIPageControl!
......@@ -29,6 +31,8 @@ protocol MyRewardsBannerOffersScrollTableViewCellDelegate: AnyObject {
profileImage.image = UIImage(named: "profile_pic_default", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
profileButton.addTarget(self, action: #selector(profileButtonTapped), for: .touchUpInside)
tagView1.backgroundColor = UIColor(rgb: 0x09914E)
tagView1.layer.cornerRadius = 4.0
tagLabel1.font = UIFont(name: "PingLCG-Regular", size: 17)
......@@ -95,6 +99,10 @@ protocol MyRewardsBannerOffersScrollTableViewCellDelegate: AnyObject {
self.collectionView.reloadData();
}
@objc private func profileButtonTapped() {
delegate?.didTapProfileButton()
}
}
extension MyRewardsBannerOffersScrollTableViewCell: UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout, UIScrollViewDelegate {
......@@ -121,7 +129,7 @@ extension MyRewardsBannerOffersScrollTableViewCell: UICollectionViewDataSource,
// Get the selected offer
if let offer = self.data?.offers[indexPath.row] {
// Call the delegate method to notify the parent
delegate?.didSelectBannerOffer(offer)
delegate?.didSelectBannerOffer(indexPath.row)
}
}
......
......@@ -12,18 +12,18 @@
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="MyRewardsBannerOffersScrollTableViewCell" rowHeight="349" id="KGk-i7-Jjw" customClass="MyRewardsBannerOffersScrollTableViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="413" height="349"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" ambiguous="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="413" height="349"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="VzF-dQ-3Wa" userLabel="Parent View">
<rect key="frame" x="0.0" y="0.0" width="413" height="298"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="VzF-dQ-3Wa" userLabel="Parent View">
<rect key="frame" x="0.0" y="0.0" width="413" height="450"/>
<subviews>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="JTs-J5-DO2" userLabel="Top View">
<rect key="frame" x="24" y="36" width="365" height="43"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JTs-J5-DO2" userLabel="Top View">
<rect key="frame" x="24" y="36" width="365" height="35"/>
<subviews>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="h09-MS-XKy">
<rect key="frame" x="0.0" y="8.6666666666666643" width="58" height="26"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="h09-MS-XKy">
<rect key="frame" x="0.0" y="4.6666666666666643" width="58" height="26"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Green" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4m7-JY-MDY">
<rect key="frame" x="6" y="3" width="46" height="20"/>
......@@ -41,8 +41,8 @@
<constraint firstItem="4m7-JY-MDY" firstAttribute="top" secondItem="h09-MS-XKy" secondAttribute="top" constant="3" id="tui-5x-ntO"/>
</constraints>
</view>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="H5g-xq-68p">
<rect key="frame" x="66" y="8.6666666666666643" width="61.666666666666657" height="26"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="H5g-xq-68p">
<rect key="frame" x="66" y="4.6666666666666643" width="61.666666666666657" height="26"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Family" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WN9-wM-hV8">
<rect key="frame" x="6" y="3" width="49.666666666666664" height="20"/>
......@@ -60,8 +60,8 @@
<constraint firstItem="WN9-wM-hV8" firstAttribute="top" secondItem="H5g-xq-68p" secondAttribute="top" constant="3" id="pwW-Ed-yv2"/>
</constraints>
</view>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5cf-tr-Vjf">
<rect key="frame" x="322" y="0.0" width="43" height="43"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5cf-tr-Vjf">
<rect key="frame" x="322" y="0.0" width="43" height="35"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="fZO-NB-UyL">
<rect key="frame" x="0.0" y="0.0" width="43" height="43"/>
......@@ -71,13 +71,25 @@
<constraint firstAttribute="height" constant="43" id="lZJ-VG-4fl"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="loI-CB-MX1" userLabel="ProfileButton">
<rect key="frame" x="0.0" y="0.0" width="43" height="35"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="Button">
<color key="baseForegroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</buttonConfiguration>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="loI-CB-MX1" secondAttribute="trailing" id="0PQ-cq-sCt"/>
<constraint firstItem="fZO-NB-UyL" firstAttribute="leading" secondItem="5cf-tr-Vjf" secondAttribute="leading" id="Bfw-5S-wqz"/>
<constraint firstItem="fZO-NB-UyL" firstAttribute="top" secondItem="5cf-tr-Vjf" secondAttribute="top" id="WCt-TJ-XQc"/>
<constraint firstItem="loI-CB-MX1" firstAttribute="top" secondItem="5cf-tr-Vjf" secondAttribute="top" id="XKb-DI-owX"/>
<constraint firstAttribute="trailing" secondItem="fZO-NB-UyL" secondAttribute="trailing" id="Z0D-wE-fgE"/>
<constraint firstItem="loI-CB-MX1" firstAttribute="leading" secondItem="5cf-tr-Vjf" secondAttribute="leading" id="fM6-dS-psa"/>
<constraint firstAttribute="bottom" secondItem="fZO-NB-UyL" secondAttribute="bottom" id="nuy-88-N5B"/>
<constraint firstAttribute="bottom" secondItem="loI-CB-MX1" secondAttribute="bottom" id="rMQ-Ec-OZs"/>
</constraints>
</view>
</subviews>
......@@ -93,8 +105,8 @@
<constraint firstItem="H5g-xq-68p" firstAttribute="leading" secondItem="h09-MS-XKy" secondAttribute="trailing" constant="8" id="wqx-Hc-3YH"/>
</constraints>
</view>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="I7z-Fz-SNP">
<rect key="frame" x="0.0" y="149" width="413" height="0.0"/>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="I7z-Fz-SNP">
<rect key="frame" x="0.0" y="76" width="413" height="348"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="348" id="aEf-Xl-A2C"/>
......@@ -111,8 +123,8 @@
<outlet property="delegate" destination="KGk-i7-Jjw" id="fQ4-0u-38c"/>
</connections>
</collectionView>
<pageControl opaque="NO" contentMode="scaleToFill" ambiguous="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="3" translatesAutoresizingMaskIntoConstraints="NO" id="lOm-CZ-dVG">
<rect key="frame" x="170" y="136" width="73" height="26"/>
<pageControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="3" translatesAutoresizingMaskIntoConstraints="NO" id="lOm-CZ-dVG">
<rect key="frame" x="170" y="424" width="73" height="26"/>
</pageControl>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
......@@ -142,6 +154,7 @@
<connections>
<outlet property="collectionView" destination="I7z-Fz-SNP" id="yrF-mR-aQu"/>
<outlet property="pageControl" destination="lOm-CZ-dVG" id="Skf-hV-rjH"/>
<outlet property="profileButton" destination="loI-CB-MX1" id="VTG-C3-3KA"/>
<outlet property="profileImage" destination="fZO-NB-UyL" id="l05-qG-DJv"/>
<outlet property="tagLabel1" destination="4m7-JY-MDY" id="Min-YW-AN2"/>
<outlet property="tagLabel2" destination="WN9-wM-hV8" id="yWk-1S-4Zk"/>
......
//
// ProfileCouponFiltersTableViewCell.swift
// SwiftWarplyFramework
//
// Created by Manos Chorianopoulos on 29/5/25.
//
import UIKit
protocol ProfileCouponFiltersTableViewCellDelegate: AnyObject {
func didSelectFilter(_ filter: CouponFilterModel)
}
@objc public class ProfileCouponFiltersTableViewCell: UITableViewCell {
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var collectionView: UICollectionView!
weak var delegate: ProfileCouponFiltersTableViewCellDelegate?
var data: [CouponFilterModel]?
public override func awakeFromNib() {
super.awakeFromNib()
titleLabel.font = UIFont(name: "PingLCG-Bold", size: 18)
titleLabel.textColor = UIColor(rgb: 0x000F1E)
// Register XIBs for collection view cells
collectionView.register(UINib(nibName: "ProfileFilterCollectionViewCell", bundle: Bundle(for: MyEmptyClass.self)), forCellWithReuseIdentifier: "ProfileFilterCollectionViewCell")
// Fix background colors
// collectionView.backgroundColor = UIColor.clear
// self.backgroundColor = UIColor.clear
// self.contentView.backgroundColor = UIColor.clear
// Remove content insets and gaps
collectionView.contentInset = UIEdgeInsets.zero
collectionView.scrollIndicatorInsets = UIEdgeInsets.zero
if #available(iOS 11.0, *) {
collectionView.contentInsetAdjustmentBehavior = .never
}
// Configure collection view layout
if let layout = collectionView.collectionViewLayout as? UICollectionViewFlowLayout {
layout.scrollDirection = .horizontal
layout.minimumLineSpacing = 15
layout.minimumInteritemSpacing = 0
layout.sectionInset = UIEdgeInsets(top: 0, left: 24, bottom: 0, right: 24)
}
// Enable paging for smooth banner scrolling
// collectionView.isPagingEnabled = true
collectionView.showsHorizontalScrollIndicator = false
// Set delegates
collectionView.delegate = self
collectionView.dataSource = self
}
public override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
func configureCell(data: [CouponFilterModel]?) {
self.data = data
self.collectionView.reloadData();
}
}
extension ProfileCouponFiltersTableViewCell: UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout {
public func numberOfSections(in collectionView: UICollectionView) -> Int {
return 1
}
public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return self.data?.count ?? 0
}
public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ProfileFilterCollectionViewCell", for: indexPath) as! ProfileFilterCollectionViewCell
if let filter = self.data?[indexPath.row] {
// TODO: Fix dynamic
let isSelected = self.data?[indexPath.row].title == "Ενεργά"
cell.configureCell(data: filter, isSelected: isSelected)
}
return cell;
}
public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
if let filter = self.data?[indexPath.row] {
delegate?.didSelectFilter(filter)
}
}
// MARK: - UICollectionViewDelegateFlowLayout
// public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
// if self.data?.title == "Αγαπημένα" {
// return CGSize(width: 275, height: 350)
// } else {
// return CGSize(width: 257, height: 232)
// }
// }
// Distance Between Item Cells
public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
return 15
}
public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
return 0
}
// Cell Margin
public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
return UIEdgeInsets(top: 0, left: 24, bottom: 0, right: 24)
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="ProfileCouponFiltersTableViewCell" rowHeight="161" id="KGk-i7-Jjw" customClass="ProfileCouponFiltersTableViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="320" height="161"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="320" height="161"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1kR-zd-duR" userLabel="ParentView">
<rect key="frame" x="0.0" y="0.0" width="320" height="161"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mga-ND-qoh">
<rect key="frame" x="24" y="26" width="272" height="49"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="Ddn-dN-xH1">
<rect key="frame" x="0.0" y="118" width="320" height="43"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="43" id="5nG-1p-kic"/>
</constraints>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" automaticEstimatedItemSize="YES" minimumLineSpacing="5" minimumInteritemSpacing="5" id="tAC-pV-kZ6">
<size key="itemSize" width="128" height="120"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<cells/>
<connections>
<outlet property="dataSource" destination="KGk-i7-Jjw" id="J6c-fu-dH8"/>
<outlet property="delegate" destination="KGk-i7-Jjw" id="D3M-nO-3sC"/>
</connections>
</collectionView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="Ddn-dN-xH1" firstAttribute="top" secondItem="mga-ND-qoh" secondAttribute="bottom" constant="43" id="1gh-45-u6h"/>
<constraint firstItem="Ddn-dN-xH1" firstAttribute="leading" secondItem="1kR-zd-duR" secondAttribute="leading" id="3IU-v8-7cI"/>
<constraint firstItem="mga-ND-qoh" firstAttribute="top" secondItem="1kR-zd-duR" secondAttribute="top" constant="26" id="J0I-v0-uwq"/>
<constraint firstAttribute="trailing" secondItem="mga-ND-qoh" secondAttribute="trailing" constant="24" id="Ss1-zq-znd"/>
<constraint firstAttribute="bottom" secondItem="Ddn-dN-xH1" secondAttribute="bottom" id="VdN-By-srg"/>
<constraint firstAttribute="trailing" secondItem="Ddn-dN-xH1" secondAttribute="trailing" id="W06-Yi-lzm"/>
<constraint firstItem="mga-ND-qoh" firstAttribute="leading" secondItem="1kR-zd-duR" secondAttribute="leading" constant="24" id="sEy-GV-Pjr"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="1kR-zd-duR" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="BHT-r3-dcg"/>
<constraint firstAttribute="trailing" secondItem="1kR-zd-duR" secondAttribute="trailing" id="eLa-yc-CeZ"/>
<constraint firstAttribute="bottom" secondItem="1kR-zd-duR" secondAttribute="bottom" id="rie-jS-xMj"/>
<constraint firstItem="1kR-zd-duR" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="vgK-SU-fRu"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="collectionView" destination="Ddn-dN-xH1" id="RzU-o5-6Dw"/>
<outlet property="titleLabel" destination="mga-ND-qoh" id="TxL-cQ-O1P"/>
</connections>
<point key="canvasLocation" x="68.702290076335871" y="29.929577464788736"/>
</tableViewCell>
</objects>
</document>
//
// ProfileCouponTableViewCell.swift
// SwiftWarplyFramework
//
// Created by Manos Chorianopoulos on 29/5/25.
//
import UIKit
@objc public class ProfileCouponTableViewCell: UITableViewCell {
@IBOutlet weak var parentView: UIView!
@IBOutlet weak var bannerImage: UIImageView!
@IBOutlet weak var favoriteImage: UIImageView!
@IBOutlet weak var discountView: UIView!
@IBOutlet weak var discountLabel: UILabel!
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var subtitleLabel: UILabel!
@IBOutlet weak var expirationLabel: UILabel!
@IBOutlet weak var logoImage: UIImageView!
public override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
parentView.layer.borderWidth = 1.0
parentView.layer.borderColor = UIColor(rgb: 0xCCCCCC).cgColor
parentView.layer.cornerRadius = 8.0
parentView.clipsToBounds = true
discountView.layer.cornerRadius = 34.0
}
func configureCell(data: OfferModel) {
bannerImage.image = UIImage(named: data.bannerImage, in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
favoriteImage.image = UIImage(named: data.isFavorite ? "favorite_filled" : "favorite_empty", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
let discountSymbol =
data.discountType == "percentage" ? "%"
: data.discountType == "price" ? "€"
: data.discountType == "buyOneGetOne" ? "1+1"
: data.discountType == "free" ? "Δωρεάν"
: ""
// discountLabel.text = "\(data.discount)\(discountSymbol)"
discountLabel.text = data.discount
discountLabel.font = UIFont(name: "PingLCG-Bold", size: 25)
discountLabel.textColor = UIColor(rgb: 0xF2F2F2)
discountView.backgroundColor = UIColor(rgb: data.color)
titleLabel.text = data.title
titleLabel.font = UIFont(name: "PingLCG-Bold", size: 22)
titleLabel.textColor = UIColor(rgb: 0x000F1E)
subtitleLabel.text = data.description
subtitleLabel.font = UIFont(name: "PingLCG-Regular", size: 16)
subtitleLabel.textColor = UIColor(rgb: 0x00111B)
expirationLabel.text = data.expirationDate
expirationLabel.font = UIFont(name: "PingLCG-Regular", size: 13)
expirationLabel.textColor = UIColor(rgb: 0x00111B)
logoImage.image = UIImage(named: data.merchantLogo, in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
}
public override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="ProfileCouponTableViewCell" rowHeight="296" id="KGk-i7-Jjw" customClass="ProfileCouponTableViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="320" height="296"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" ambiguous="YES" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="320" height="296"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="x0X-za-HZ9" userLabel="Parent View">
<rect key="frame" x="22" y="0.0" width="276" height="292"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8Ht-7Z-jiW" userLabel="Top View">
<rect key="frame" x="0.0" y="0.0" width="276" height="171"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="09g-Nj-HG4">
<rect key="frame" x="0.0" y="0.0" width="276" height="171"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4xy-g8-Ukx" userLabel="Fav View">
<rect key="frame" x="16" y="13" width="46" height="46"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="T91-Ra-dmT">
<rect key="frame" x="0.0" y="0.0" width="46" height="46"/>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="46" id="Cc2-q8-pqb"/>
<constraint firstAttribute="trailing" secondItem="T91-Ra-dmT" secondAttribute="trailing" id="FHe-DH-ghP"/>
<constraint firstItem="T91-Ra-dmT" firstAttribute="top" secondItem="4xy-g8-Ukx" secondAttribute="top" id="HMT-10-TaU"/>
<constraint firstAttribute="bottom" secondItem="T91-Ra-dmT" secondAttribute="bottom" id="K7M-Vf-uo8"/>
<constraint firstItem="T91-Ra-dmT" firstAttribute="leading" secondItem="4xy-g8-Ukx" secondAttribute="leading" id="diD-2x-xIG"/>
<constraint firstAttribute="height" constant="46" id="gtM-XV-LnS"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dnZ-fa-M3o" userLabel="Discount View">
<rect key="frame" x="179" y="14" width="84" height="84"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XeI-PB-wG7">
<rect key="frame" x="5" y="31.666666666666664" width="74" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="84" id="8gp-O1-LgD"/>
<constraint firstAttribute="width" constant="84" id="Mve-Yl-rsU"/>
<constraint firstItem="XeI-PB-wG7" firstAttribute="centerY" secondItem="dnZ-fa-M3o" secondAttribute="centerY" id="Rlp-4Z-urE"/>
<constraint firstAttribute="trailing" secondItem="XeI-PB-wG7" secondAttribute="trailing" constant="5" id="dyI-UO-uvn"/>
<constraint firstItem="XeI-PB-wG7" firstAttribute="leading" secondItem="dnZ-fa-M3o" secondAttribute="leading" constant="5" id="eon-8Y-X7c"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="09g-Nj-HG4" firstAttribute="leading" secondItem="8Ht-7Z-jiW" secondAttribute="leading" id="1AO-0a-ZpN"/>
<constraint firstItem="dnZ-fa-M3o" firstAttribute="top" secondItem="8Ht-7Z-jiW" secondAttribute="top" constant="14" id="AC6-zX-rmc"/>
<constraint firstItem="09g-Nj-HG4" firstAttribute="top" secondItem="8Ht-7Z-jiW" secondAttribute="top" id="DYc-4B-bTE"/>
<constraint firstAttribute="bottom" secondItem="09g-Nj-HG4" secondAttribute="bottom" id="Rsg-ZQ-0bM"/>
<constraint firstItem="4xy-g8-Ukx" firstAttribute="leading" secondItem="8Ht-7Z-jiW" secondAttribute="leading" constant="16" id="U8A-vw-Pca"/>
<constraint firstItem="4xy-g8-Ukx" firstAttribute="top" secondItem="8Ht-7Z-jiW" secondAttribute="top" constant="13" id="ZGF-7X-iSN"/>
<constraint firstAttribute="trailing" secondItem="09g-Nj-HG4" secondAttribute="trailing" id="qwK-yM-rD6"/>
<constraint firstAttribute="trailing" secondItem="dnZ-fa-M3o" secondAttribute="trailing" constant="13" id="zAy-FM-iqd"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fZ6-8K-DXr" userLabel="Bottom View">
<rect key="frame" x="0.0" y="171" width="276" height="121"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YtM-Db-ygP">
<rect key="frame" x="16" y="17" width="130" height="93"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="63p-dI-yTa">
<rect key="frame" x="0.0" y="0.0" width="130" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="z30-VZ-8h3">
<rect key="frame" x="0.0" y="23" width="130" height="20.333333333333329"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PZ3-qH-3XH">
<rect key="frame" x="0.0" y="72" width="130" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="z30-VZ-8h3" firstAttribute="leading" secondItem="YtM-Db-ygP" secondAttribute="leading" id="DHf-fQ-lXA"/>
<constraint firstAttribute="trailing" secondItem="z30-VZ-8h3" secondAttribute="trailing" id="DnI-99-e8v"/>
<constraint firstAttribute="trailing" secondItem="PZ3-qH-3XH" secondAttribute="trailing" id="JA5-Am-dmE"/>
<constraint firstItem="63p-dI-yTa" firstAttribute="top" secondItem="YtM-Db-ygP" secondAttribute="top" id="Kfa-m3-rWW"/>
<constraint firstAttribute="trailing" secondItem="63p-dI-yTa" secondAttribute="trailing" id="bxa-5c-OE6"/>
<constraint firstItem="63p-dI-yTa" firstAttribute="leading" secondItem="YtM-Db-ygP" secondAttribute="leading" id="gk1-Zr-MIl"/>
<constraint firstItem="PZ3-qH-3XH" firstAttribute="leading" secondItem="YtM-Db-ygP" secondAttribute="leading" id="hE4-2m-iZk"/>
<constraint firstItem="z30-VZ-8h3" firstAttribute="top" secondItem="63p-dI-yTa" secondAttribute="bottom" constant="2" id="hfr-Gi-omT"/>
<constraint firstAttribute="bottom" secondItem="PZ3-qH-3XH" secondAttribute="bottom" id="xMs-dh-ybb"/>
</constraints>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="hM2-8T-4vX">
<rect key="frame" x="164" y="17" width="84" height="84"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="84" id="6to-Dv-ukR"/>
<constraint firstAttribute="height" constant="84" id="QjU-rO-Uqx"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="YtM-Db-ygP" secondAttribute="bottom" constant="11" id="6ul-bC-Jpj"/>
<constraint firstItem="YtM-Db-ygP" firstAttribute="leading" secondItem="fZ6-8K-DXr" secondAttribute="leading" constant="16" id="C7J-bI-8ap"/>
<constraint firstItem="hM2-8T-4vX" firstAttribute="top" secondItem="fZ6-8K-DXr" secondAttribute="top" constant="17" id="HBF-J2-ed0"/>
<constraint firstItem="hM2-8T-4vX" firstAttribute="leading" secondItem="YtM-Db-ygP" secondAttribute="trailing" constant="18" id="WML-nR-cLh"/>
<constraint firstItem="YtM-Db-ygP" firstAttribute="top" secondItem="fZ6-8K-DXr" secondAttribute="top" constant="17" id="f0H-m3-OAP"/>
<constraint firstAttribute="trailing" secondItem="hM2-8T-4vX" secondAttribute="trailing" constant="28" id="jKa-nW-g41"/>
<constraint firstAttribute="height" constant="121" id="ptz-uq-5rq"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="fZ6-8K-DXr" firstAttribute="leading" secondItem="x0X-za-HZ9" secondAttribute="leading" id="DKa-9V-lma"/>
<constraint firstAttribute="trailing" secondItem="8Ht-7Z-jiW" secondAttribute="trailing" id="LK1-Cz-JUh"/>
<constraint firstItem="8Ht-7Z-jiW" firstAttribute="top" secondItem="x0X-za-HZ9" secondAttribute="top" id="P9v-fu-Mhs"/>
<constraint firstAttribute="height" constant="292" id="lA6-op-vsG"/>
<constraint firstAttribute="trailing" secondItem="fZ6-8K-DXr" secondAttribute="trailing" id="lAU-n1-MKy"/>
<constraint firstItem="8Ht-7Z-jiW" firstAttribute="leading" secondItem="x0X-za-HZ9" secondAttribute="leading" id="sK9-Tw-Yqn"/>
<constraint firstAttribute="bottom" secondItem="fZ6-8K-DXr" secondAttribute="bottom" id="u4z-JD-qby"/>
<constraint firstItem="fZ6-8K-DXr" firstAttribute="top" secondItem="8Ht-7Z-jiW" secondAttribute="bottom" id="v5X-nL-hKm"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="x0X-za-HZ9" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="22" id="SzO-Fk-ZCB"/>
<constraint firstItem="x0X-za-HZ9" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="uQN-BA-o6w"/>
<constraint firstAttribute="trailing" secondItem="x0X-za-HZ9" secondAttribute="trailing" constant="22" id="vi4-dI-lx3"/>
<constraint firstAttribute="bottom" secondItem="x0X-za-HZ9" secondAttribute="bottom" id="zsL-aX-JRL"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="bannerImage" destination="09g-Nj-HG4" id="1Ux-ZI-rVQ"/>
<outlet property="discountLabel" destination="XeI-PB-wG7" id="Kyy-aE-GgR"/>
<outlet property="discountView" destination="dnZ-fa-M3o" id="fht-MW-ToM"/>
<outlet property="expirationLabel" destination="PZ3-qH-3XH" id="vIb-60-EVp"/>
<outlet property="favoriteImage" destination="T91-Ra-dmT" id="leZ-Tz-zo8"/>
<outlet property="logoImage" destination="hM2-8T-4vX" id="Zqv-yp-lrD"/>
<outlet property="parentView" destination="x0X-za-HZ9" id="OE0-tT-IPd"/>
<outlet property="subtitleLabel" destination="z30-VZ-8h3" id="s40-MP-4Jn"/>
<outlet property="titleLabel" destination="63p-dI-yTa" id="YOe-I2-Cly"/>
</connections>
<point key="canvasLocation" x="68.702290076335871" y="77.464788732394368"/>
</tableViewCell>
</objects>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
//
// ProfileFilterCollectionViewCell.swift
// SwiftWarplyFramework
//
// Created by Manos Chorianopoulos on 29/5/25.
//
import UIKit
@objc public class ProfileFilterCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var parentView: UIView!
@IBOutlet weak var titleLabel: UILabel!
public override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
func configureCell(data: CouponFilterModel, isSelected: Bool) {
if (isSelected) {
parentView.backgroundColor = UIColor(rgb: 0x000F1E)
parentView.layer.cornerRadius = 4.0
titleLabel.font = UIFont(name: "PingLCG-Bold", size: 16)
titleLabel.textColor = UIColor(rgb: 0xFFFFFF)
} else {
parentView.backgroundColor = .clear
parentView.layer.borderWidth = 2
parentView.layer.borderColor = UIColor(rgb: 0x56586A).cgColor
parentView.layer.cornerRadius = 4.0
titleLabel.font = UIFont(name: "PingLCG-Bold", size: 16)
titleLabel.textColor = UIColor(rgb: 0xFFFFFF)
}
titleLabel.text = data.title
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="ProfileFilterCollectionViewCell" id="gTV-IL-0wX" customClass="ProfileFilterCollectionViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="145" height="66"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="145" height="66"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NgU-Qp-M8l" userLabel="ParentView">
<rect key="frame" x="0.0" y="0.0" width="145" height="66"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xq0-AN-QT6">
<rect key="frame" x="17" y="12" width="111" height="42"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="Xq0-AN-QT6" firstAttribute="top" secondItem="NgU-Qp-M8l" secondAttribute="top" constant="12" id="Nro-8v-U0C"/>
<constraint firstAttribute="trailing" secondItem="Xq0-AN-QT6" secondAttribute="trailing" constant="17" id="hKh-jv-VQR"/>
<constraint firstItem="Xq0-AN-QT6" firstAttribute="leading" secondItem="NgU-Qp-M8l" secondAttribute="leading" constant="17" id="na6-tV-KQZ"/>
<constraint firstAttribute="bottom" secondItem="Xq0-AN-QT6" secondAttribute="bottom" constant="12" id="pJO-74-XZO"/>
</constraints>
</view>
</subviews>
</view>
<viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="NgU-Qp-M8l" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="RYQ-Qn-MSN"/>
<constraint firstAttribute="trailing" secondItem="NgU-Qp-M8l" secondAttribute="trailing" id="efv-x1-lhD"/>
<constraint firstItem="NgU-Qp-M8l" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="l7p-or-kC2"/>
<constraint firstAttribute="bottom" secondItem="NgU-Qp-M8l" secondAttribute="bottom" id="te6-Qr-T6c"/>
</constraints>
<size key="customSize" width="145" height="66"/>
<connections>
<outlet property="parentView" destination="NgU-Qp-M8l" id="qhP-z2-cWY"/>
<outlet property="titleLabel" destination="Xq0-AN-QT6" id="Hft-IP-ITh"/>
</connections>
<point key="canvasLocation" x="109.16030534351144" y="-5.6338028169014089"/>
</collectionViewCell>
</objects>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
//
// ProfileHeaderTableViewCell.swift
// SwiftWarplyFramework
//
// Created by Manos Chorianopoulos on 29/5/25.
//
import UIKit
@objc public class ProfileHeaderTableViewCell: UITableViewCell {
@IBOutlet weak var tagView1: UIView!
@IBOutlet weak var tagLabel1: UILabel!
@IBOutlet weak var tagView2: UIView!
@IBOutlet weak var tagLabel2: UILabel!
@IBOutlet weak var profileImage: UIImageView!
public override func awakeFromNib() {
super.awakeFromNib()
profileImage.image = UIImage(named: "profile_pic_default", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
tagView1.backgroundColor = UIColor(rgb: 0x09914E)
tagView1.layer.cornerRadius = 4.0
tagLabel1.font = UIFont(name: "PingLCG-Regular", size: 17)
tagLabel1.textColor = UIColor(rgb: 0xFFFFFF)
tagView2.backgroundColor = UIColor(rgb: 0xFC9F25)
tagView2.layer.cornerRadius = 4.0
tagLabel2.font = UIFont(name: "PingLCG-Regular", size: 17)
tagLabel2.textColor = UIColor(rgb: 0xFFFFFF)
}
public override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="ProfileHeaderTableViewCell" id="KGk-i7-Jjw" customClass="ProfileHeaderTableViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" ambiguous="YES" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EZC-E7-4NP" userLabel="Parent View">
<rect key="frame" x="31" y="0.0" width="258" height="43"/>
<subviews>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PbJ-yt-Kn6">
<rect key="frame" x="0.0" y="8.6666666666666643" width="58" height="26"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Green" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3iK-77-YPt">
<rect key="frame" x="6" y="3" width="46" height="20"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.035294117649999998" green="0.56862745100000001" blue="0.30588235289999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="3iK-77-YPt" secondAttribute="bottom" constant="3" id="AzT-L8-M11"/>
<constraint firstItem="3iK-77-YPt" firstAttribute="leading" secondItem="PbJ-yt-Kn6" secondAttribute="leading" constant="6" id="CXA-8o-8hw"/>
<constraint firstItem="3iK-77-YPt" firstAttribute="top" secondItem="PbJ-yt-Kn6" secondAttribute="top" constant="3" id="HgB-cm-GWV"/>
<constraint firstAttribute="trailing" secondItem="3iK-77-YPt" secondAttribute="trailing" constant="6" id="kcr-Fy-V25"/>
</constraints>
</view>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="BIN-Ee-QVw">
<rect key="frame" x="66" y="8.6666666666666643" width="61.666666666666657" height="26"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Family" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RrC-Qf-9bC">
<rect key="frame" x="6" y="3" width="49.666666666666664" height="20"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.98823529409999999" green="0.62352941179999999" blue="0.1450980392" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="RrC-Qf-9bC" firstAttribute="top" secondItem="BIN-Ee-QVw" secondAttribute="top" constant="3" id="GPN-tb-Pfo"/>
<constraint firstItem="RrC-Qf-9bC" firstAttribute="leading" secondItem="BIN-Ee-QVw" secondAttribute="leading" constant="6" id="NbB-AF-IA0"/>
<constraint firstAttribute="bottom" secondItem="RrC-Qf-9bC" secondAttribute="bottom" constant="3" id="PLN-Gb-IUu"/>
<constraint firstAttribute="trailing" secondItem="RrC-Qf-9bC" secondAttribute="trailing" constant="6" id="pdI-Ll-nUY"/>
</constraints>
</view>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="oRt-jB-UR1">
<rect key="frame" x="221" y="0.0" width="37" height="43"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ka7-9X-7t4">
<rect key="frame" x="0.0" y="0.0" width="37" height="37"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="37" id="l80-J9-yl7"/>
<constraint firstAttribute="height" constant="37" id="td4-wH-CiD"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="ka7-9X-7t4" secondAttribute="bottom" id="0YM-ws-0Dg"/>
<constraint firstItem="ka7-9X-7t4" firstAttribute="top" secondItem="oRt-jB-UR1" secondAttribute="top" id="r2H-hN-E5S"/>
<constraint firstAttribute="trailing" secondItem="ka7-9X-7t4" secondAttribute="trailing" id="tGk-Nv-WzC"/>
<constraint firstItem="ka7-9X-7t4" firstAttribute="leading" secondItem="oRt-jB-UR1" secondAttribute="leading" id="te7-Gw-oyL"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="oRt-jB-UR1" firstAttribute="top" secondItem="EZC-E7-4NP" secondAttribute="top" id="AEJ-YC-aVw"/>
<constraint firstItem="PbJ-yt-Kn6" firstAttribute="leading" secondItem="EZC-E7-4NP" secondAttribute="leading" id="Afn-AJ-Tfk"/>
<constraint firstItem="PbJ-yt-Kn6" firstAttribute="centerY" secondItem="EZC-E7-4NP" secondAttribute="centerY" id="fC0-9G-Ajq"/>
<constraint firstAttribute="bottom" secondItem="oRt-jB-UR1" secondAttribute="bottom" id="mvy-dD-Q26"/>
<constraint firstAttribute="trailing" secondItem="oRt-jB-UR1" secondAttribute="trailing" id="nAT-Wu-pvL"/>
<constraint firstItem="oRt-jB-UR1" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="BIN-Ee-QVw" secondAttribute="trailing" constant="8" id="ohN-Bc-zfQ"/>
<constraint firstItem="BIN-Ee-QVw" firstAttribute="centerY" secondItem="EZC-E7-4NP" secondAttribute="centerY" id="q7G-9L-LXt"/>
<constraint firstItem="BIN-Ee-QVw" firstAttribute="leading" secondItem="PbJ-yt-Kn6" secondAttribute="trailing" constant="8" id="yPy-YQ-6bl"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="EZC-E7-4NP" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="31" id="5YW-dG-HjU"/>
<constraint firstAttribute="trailing" secondItem="EZC-E7-4NP" secondAttribute="trailing" constant="31" id="6BI-8F-Fsl"/>
<constraint firstAttribute="bottom" secondItem="EZC-E7-4NP" secondAttribute="bottom" id="spA-yG-SaN"/>
<constraint firstItem="EZC-E7-4NP" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="27" id="zUZ-e2-jYJ"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="profileImage" destination="ka7-9X-7t4" id="ejB-Ra-63T"/>
<outlet property="tagLabel1" destination="3iK-77-YPt" id="q1E-7d-qjF"/>
<outlet property="tagLabel2" destination="RrC-Qf-9bC" id="5Vq-uh-qaL"/>
<outlet property="tagView1" destination="PbJ-yt-Kn6" id="kCL-Ll-U6s"/>
<outlet property="tagView2" destination="BIN-Ee-QVw" id="fkF-yO-znw"/>
</connections>
<point key="canvasLocation" x="70" y="-11"/>
</tableViewCell>
</objects>
</document>
//
// ProfileQuestionnaireTableViewCell.swift
// SwiftWarplyFramework
//
// Created by Manos Chorianopoulos on 29/5/25.
//
import UIKit
@objc public class ProfileQuestionnaireTableViewCell: UITableViewCell {
@IBOutlet weak var questionnaireBannerImage: UIImageView!
public override func awakeFromNib() {
super.awakeFromNib()
questionnaireBannerImage.image = UIImage(named: "questionnaire_banner", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
}
public override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="ProfileQuestionnaireTableViewCell" rowHeight="211" id="KGk-i7-Jjw" customClass="ProfileQuestionnaireTableViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="320" height="211"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" ambiguous="YES" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="320" height="211"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="YrO-k4-v2O" userLabel="ParentView">
<rect key="frame" x="24" y="35" width="272" height="9"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="N8L-PD-UP8">
<rect key="frame" x="0.0" y="0.0" width="272" height="159"/>
<color key="backgroundColor" systemColor="systemRedColor"/>
<constraints>
<constraint firstAttribute="height" constant="159" id="r1F-lV-yNf"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="N8L-PD-UP8" firstAttribute="leading" secondItem="YrO-k4-v2O" secondAttribute="leading" id="Ay6-kG-U8L"/>
<constraint firstAttribute="bottom" secondItem="N8L-PD-UP8" secondAttribute="bottom" id="S87-T5-YdQ"/>
<constraint firstAttribute="trailing" secondItem="N8L-PD-UP8" secondAttribute="trailing" id="WGt-wu-sFI"/>
<constraint firstItem="N8L-PD-UP8" firstAttribute="top" secondItem="YrO-k4-v2O" secondAttribute="top" id="ZxG-A7-Zci"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="YrO-k4-v2O" secondAttribute="bottom" id="6we-5l-yeL"/>
<constraint firstAttribute="trailing" secondItem="YrO-k4-v2O" secondAttribute="trailing" constant="24" id="7CD-5N-Kwy"/>
<constraint firstItem="YrO-k4-v2O" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="24" id="ExZ-x2-yiF"/>
<constraint firstItem="YrO-k4-v2O" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="35" id="iID-80-Men"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="questionnaireBannerImage" destination="N8L-PD-UP8" id="BMn-6A-UVw"/>
</connections>
<point key="canvasLocation" x="68.702290076335871" y="47.535211267605639"/>
</tableViewCell>
</objects>
<resources>
<systemColor name="systemRedColor">
<color red="1" green="0.23137254900000001" blue="0.18823529410000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
//
// Models.swift
// SwiftWarplyFramework
//
// Created by Manos Chorianopoulos on 29/5/25.
//
struct SectionModel {
let title: String
let count: Int
let offers: [OfferModel]
}
struct OfferModel {
let category: String
let title: String
let description: String
let discount: String
let discountType: String // e.g., "price", "percentage", "free", "buyOneGetOne", etc.
let bannerImage: String
let merchantLogo: String
let expirationDate: String
let color: UInt
var isFavorite: Bool
var active: Bool?
var redeemed: Bool?
}
struct CouponFilterModel {
let title: String
}
......@@ -7,24 +7,6 @@
import UIKit
struct SectionModel {
let title: String
let count: Int
let offers: [OfferModel]
}
struct OfferModel {
let category: String
let title: String
let description: String
let discount: String
let discountType: String // e.g., "price", "percentage", "free", "buyOneGetOne", etc.
let bannerImage: String
let merchantLogo: String
let expirationDate: String
let color: UInt
var isFavorite: Bool
}
@objc public class MyRewardsViewController: UIViewController {
@IBOutlet weak var tableView: UITableView!
......@@ -80,18 +62,6 @@ struct OfferModel {
color: 0x8A2BE2,
isFavorite: false
),
OfferModel(
category: "Διαγωνισμός",
title: "Διαγωνισμός Κού-πονς!",
description: "13 Απίθανα ΔΩΡΑ σε περιμένουν!",
discount: "",
discountType: "contest",
bannerImage: "contest_banner_5",
merchantLogo: "contest_logo",
expirationDate: "30/06/2025",
color: 0x8A2BE2,
isFavorite: false
),
// Top offers
OfferModel(
category: "Top offers",
......@@ -301,6 +271,13 @@ struct OfferModel {
)
]
let contestUrls: [String] = [
"https://warply.s3.amazonaws.com/dei/campaigns/tesla_dev/index.html",
"https://warply.s3.amazonaws.com/dei/campaigns/EnergySaverContest_dev/index.html",
"https://warply.s3.amazonaws.com/dei/campaigns/match_dev/index.html",
"https://warply.s3.amazonaws.com/dei/campaigns/questionnaire_dev"
]
var bannerOffersSection: SectionModel?
var topOffersSection: SectionModel?
var favoriteOffersSection: SectionModel?
......@@ -423,11 +400,12 @@ struct OfferModel {
self.tableView.reloadData()
}
private func openCampaignViewController(with offer: OfferModel) {
private func openCampaignViewController(with index: Int) {
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
if let vc = storyboard.instantiateViewController(withIdentifier: "CampaignViewController") as? SwiftWarplyFramework.CampaignViewController {
vc.campaignUrl = "https://warply.s3.amazonaws.com/dei/campaigns/DehEasterContest_stage/index.html"
// vc.campaignUrl = "https://warply.s3.amazonaws.com/dei/campaigns/DehEasterContest_stage/index.html"
vc.campaignUrl = contestUrls[index]
vc.showHeader = true
self.navigationController?.pushViewController(vc, animated: true)
// self.present(vc, animated: true)
......@@ -440,6 +418,12 @@ struct OfferModel {
self.navigationController?.pushViewController(vc, animated: true)
}
private func openProfileViewController() {
let vc = SwiftWarplyFramework.ProfileViewController(nibName: "ProfileViewController", bundle: Bundle(for: MyEmptyClass.self))
self.navigationController?.pushViewController(vc, animated: true)
}
}
// MARK: - TableView
......@@ -536,9 +520,14 @@ extension MyRewardsViewController: UITableViewDelegate, UITableViewDataSource{
// Add delegate conformance
extension MyRewardsViewController: MyRewardsBannerOffersScrollTableViewCellDelegate {
func didSelectBannerOffer(_ offer: OfferModel) {
func didSelectBannerOffer(_ index: Int) {
// Navigate to CampaignViewController
openCampaignViewController(with: offer)
openCampaignViewController(with: index)
}
func didTapProfileButton() {
// Navigate to ProfileViewController
openProfileViewController()
}
}
......
......@@ -172,6 +172,14 @@ import UIKit
)
]
let couponFilters: [CouponFilterModel] = [
CouponFilterModel(title: "Ενεργά"),
CouponFilterModel(title: "Αγαπημένα"),
CouponFilterModel(title: "Εξαργυρωμένα")
]
var couponFilterSelected: CouponFilterModel = CouponFilterModel(title: "Ενεργά")
var forYouOffersSection: SectionModel?
var activeOffersSection: SectionModel?
var favoriteOffersSection: SectionModel?
......@@ -187,8 +195,11 @@ import UIKit
setNavigationTitle("Το προφίλ μου")
// Register XIBs for table view cells
// tableView.register(UINib(nibName: "MyRewardsBannerOffersScrollTableViewCell", bundle: Bundle(for: MyEmptyClass.self)), forCellReuseIdentifier: "MyRewardsBannerOffersScrollTableViewCell")
// tableView.register(UINib(nibName: "MyRewardsOffersScrollTableViewCell", bundle: Bundle(for: MyEmptyClass.self)), forCellReuseIdentifier: "MyRewardsOffersScrollTableViewCell")
tableView.register(UINib(nibName: "ProfileHeaderTableViewCell", bundle: Bundle(for: MyEmptyClass.self)), forCellReuseIdentifier: "ProfileHeaderTableViewCell")
tableView.register(UINib(nibName: "ProfileQuestionnaireTableViewCell", bundle: Bundle(for: MyEmptyClass.self)), forCellReuseIdentifier: "ProfileQuestionnaireTableViewCell")
tableView.register(UINib(nibName: "MyRewardsOffersScrollTableViewCell", bundle: Bundle(for: MyEmptyClass.self)), forCellReuseIdentifier: "MyRewardsOffersScrollTableViewCell")
tableView.register(UINib(nibName: "ProfileCouponFiltersTableViewCell", bundle: Bundle(for: MyEmptyClass.self)), forCellReuseIdentifier: "ProfileCouponFiltersTableViewCell")
tableView.register(UINib(nibName: "ProfileCouponTableViewCell", bundle: Bundle(for: MyEmptyClass.self)), forCellReuseIdentifier: "ProfileCouponTableViewCell")
// Set up table view
tableView.delegate = self
......@@ -211,13 +222,15 @@ import UIKit
)
// Favorite Offers
let activeOffers = allOffers.filter { $0.active }
let activeOffers = allOffers.filter { $0.active ?? false }
activeOffersSection = SectionModel(
title: "Ενεργά",
count: activeOffers.count,
offers: activeOffers
)
filteredOffersSection = activeOffersSection
// Favorite Offers
let favoriteOffers = allOffers.filter { $0.isFavorite }
favoriteOffersSection = SectionModel(
......@@ -227,7 +240,7 @@ import UIKit
)
// Favorite Offers
let redeemedOffers = allOffers.filter { $0.redeemed }
let redeemedOffers = allOffers.filter { $0.redeemed ?? false }
redeemedOffersSection = SectionModel(
title: "Αγαπημένα",
count: redeemedOffers.count,
......@@ -236,13 +249,20 @@ import UIKit
self.tableView.reloadData()
}
private func openCouponViewController(with offer: OfferModel) {
let vc = SwiftWarplyFramework.CouponViewController(nibName: "CouponViewController", bundle: Bundle(for: MyEmptyClass.self))
vc.coupon = offer
self.navigationController?.pushViewController(vc, animated: true)
}
}
// MARK: - TableView
extension MyRewardsViewController: UITableViewDelegate, UITableViewDataSource{
extension ProfileViewController: UITableViewDelegate, UITableViewDataSource {
public func numberOfSections(in tableView: UITableView) -> Int {
return 4 + filteredOffersSection.offers.count
return 4 + (filteredOffersSection?.offers.count ?? 0)
}
public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
......@@ -272,35 +292,37 @@ extension MyRewardsViewController: UITableViewDelegate, UITableViewDataSource{
public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if (indexPath.section == 0) {
let cell = tableView.dequeueReusableCell(withIdentifier: "MyRewardsBannerOffersScrollTableViewCell", for: indexPath) as! MyRewardsBannerOffersScrollTableViewCell
cell.delegate = self // Set the banner offers delegate
cell.configureCell(data: self.bannerOffersSection)
let cell = tableView.dequeueReusableCell(withIdentifier: "ProfileHeaderTableViewCell", for: indexPath) as! ProfileHeaderTableViewCell
// cell.delegate = self // Set the banner offers delegate
// cell.configureCell(data: self.bannerOffersSection)
// cell.parent = self
return cell
} else {
} else if (indexPath.section == 1) {
let cell = tableView.dequeueReusableCell(withIdentifier: "ProfileQuestionnaireTableViewCell", for: indexPath) as! ProfileQuestionnaireTableViewCell
return cell
} else if (indexPath.section == 2) {
let cell = tableView.dequeueReusableCell(withIdentifier: "MyRewardsOffersScrollTableViewCell", for: indexPath) as! MyRewardsOffersScrollTableViewCell
cell.delegate = self // Set the offers delegate
cell.configureCell(data: self.forYouOffersSection)
return cell
if (indexPath.section == 1) {
cell.configureCell(data: self.topOffersSection)
} else if (indexPath.section == 2) {
cell.configureCell(data: self.favoriteOffersSection)
} else if (indexPath.section == 3) {
cell.configureCell(data: self.sustainableOffersSection)
} else if (indexPath.section == 4) {
cell.configureCell(data: self.familyOffersSection)
} else if (indexPath.section == 5) {
cell.configureCell(data: self.foodOffersSection)
} else if (indexPath.section == 6) {
cell.configureCell(data: self.escapeOffersSection)
} else if (indexPath.section == 7) {
cell.configureCell(data: self.childOffersSection)
let cell = tableView.dequeueReusableCell(withIdentifier: "ProfileCouponFiltersTableViewCell", for: indexPath) as! ProfileCouponFiltersTableViewCell
cell.delegate = self // Set the offers delegate
cell.configureCell(data: self.couponFilters)
return cell
} else {
cell.configureCell(data: self.shoppingOffersSection)
let cell = tableView.dequeueReusableCell(withIdentifier: "ProfileCouponTableViewCell", for: indexPath) as! ProfileCouponTableViewCell
if let offer = self.filteredOffersSection?.offers[indexPath.row] {
cell.configureCell(data: offer)
}
return cell
}
......@@ -330,3 +352,18 @@ extension MyRewardsViewController: UITableViewDelegate, UITableViewDataSource{
}
}
// Add delegate conformance
extension ProfileViewController: MyRewardsOffersScrollTableViewCellDelegate {
func didSelectOffer(_ offer: OfferModel) {
// Navigate to CouponViewController
openCouponViewController(with: offer)
}
}
// Add delegate conformance
extension ProfileViewController: ProfileCouponFiltersTableViewCellDelegate {
func didSelectFilter(_ filter: CouponFilterModel) {
self.couponFilterSelected = filter
self.tableView.reloadData()
}
}
......