Showing
11 changed files
with
583 additions
and
1 deletions
| ... | @@ -57,7 +57,11 @@ let package = Package( | ... | @@ -57,7 +57,11 @@ let package = Package( |
| 57 | .process("cells/MyRewardsOfferCollectionViewCell/MyRewardsOfferCollectionViewCell.xib"), | 57 | .process("cells/MyRewardsOfferCollectionViewCell/MyRewardsOfferCollectionViewCell.xib"), |
| 58 | .process("cells/MyRewardsBannerOffersScrollTableViewCell/MyRewardsBannerOffersScrollTableViewCell.xib"), | 58 | .process("cells/MyRewardsBannerOffersScrollTableViewCell/MyRewardsBannerOffersScrollTableViewCell.xib"), |
| 59 | .process("screens/MyCouponsViewController/MyCouponsViewController.xib"), | 59 | .process("screens/MyCouponsViewController/MyCouponsViewController.xib"), |
| 60 | - .process("cells/MyCouponsHeaderTableViewCell/MyCouponsHeaderTableViewCell.xib") | 60 | + .process("cells/MyCouponsHeaderTableViewCell/MyCouponsHeaderTableViewCell.xib"), |
| 61 | + .process("cells/CategoryOfferCollectionViewCell/CategoryOfferCollectionViewCell.xib"), | ||
| 62 | + .process("cells/CategoryOffersHeaderTableViewCell/CategoryOffersHeaderTableViewCell.xib"), | ||
| 63 | + .process("cells/CategoryOffersGridTableViewCell/CategoryOffersGridTableViewCell.xib"), | ||
| 64 | + .process("screens/CategoryOffersViewController/CategoryOffersViewController.xib") | ||
| 61 | ] | 65 | ] |
| 62 | ), | 66 | ), |
| 63 | ] | 67 | ] | ... | ... |
| ... | @@ -77,6 +77,14 @@ | ... | @@ -77,6 +77,14 @@ |
| 77 | 626AF6DE2F699081008BCA08 /* MapViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 626AF6DC2F699081008BCA08 /* MapViewController.swift */; }; | 77 | 626AF6DE2F699081008BCA08 /* MapViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 626AF6DC2F699081008BCA08 /* MapViewController.swift */; }; |
| 78 | 626AF6DF2F699081008BCA08 /* MapViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 626AF6DD2F699081008BCA08 /* MapViewController.xib */; }; | 78 | 626AF6DF2F699081008BCA08 /* MapViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 626AF6DD2F699081008BCA08 /* MapViewController.xib */; }; |
| 79 | 626DC8012F6ACA3B00CFC8C2 /* CarouselItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 626DC8002F6ACA3B00CFC8C2 /* CarouselItemModel.swift */; }; | 79 | 626DC8012F6ACA3B00CFC8C2 /* CarouselItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 626DC8002F6ACA3B00CFC8C2 /* CarouselItemModel.swift */; }; |
| 80 | + 627B9C752F6C3EB000A2456F /* CategoryOffersViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 627B9C732F6C3EB000A2456F /* CategoryOffersViewController.swift */; }; | ||
| 81 | + 627B9C762F6C3EB000A2456F /* CategoryOffersViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 627B9C742F6C3EB000A2456F /* CategoryOffersViewController.xib */; }; | ||
| 82 | + 627B9C7A2F6C438500A2456F /* CategoryOfferCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 627B9C782F6C438500A2456F /* CategoryOfferCollectionViewCell.swift */; }; | ||
| 83 | + 627B9C7B2F6C438500A2456F /* CategoryOfferCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 627B9C792F6C438500A2456F /* CategoryOfferCollectionViewCell.xib */; }; | ||
| 84 | + 627B9C7F2F6C48E800A2456F /* CategoryOffersHeaderTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 627B9C7D2F6C48E800A2456F /* CategoryOffersHeaderTableViewCell.swift */; }; | ||
| 85 | + 627B9C802F6C48E800A2456F /* CategoryOffersHeaderTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 627B9C7E2F6C48E800A2456F /* CategoryOffersHeaderTableViewCell.xib */; }; | ||
| 86 | + 627B9C842F6C492F00A2456F /* CategoryOffersGridTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 627B9C822F6C492F00A2456F /* CategoryOffersGridTableViewCell.swift */; }; | ||
| 87 | + 627B9C852F6C492F00A2456F /* CategoryOffersGridTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 627B9C832F6C492F00A2456F /* CategoryOffersGridTableViewCell.xib */; }; | ||
| 80 | 62A0A6D32F67FEDC00508534 /* MyCouponsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62A0A6D12F67FEDC00508534 /* MyCouponsViewController.swift */; }; | 88 | 62A0A6D32F67FEDC00508534 /* MyCouponsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62A0A6D12F67FEDC00508534 /* MyCouponsViewController.swift */; }; |
| 81 | 62A0A6D42F67FEDC00508534 /* MyCouponsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 62A0A6D22F67FEDC00508534 /* MyCouponsViewController.xib */; }; | 89 | 62A0A6D42F67FEDC00508534 /* MyCouponsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 62A0A6D22F67FEDC00508534 /* MyCouponsViewController.xib */; }; |
| 82 | 62A0A6D82F680C6A00508534 /* MyCouponsHeaderTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62A0A6D62F680C6A00508534 /* MyCouponsHeaderTableViewCell.swift */; }; | 90 | 62A0A6D82F680C6A00508534 /* MyCouponsHeaderTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62A0A6D62F680C6A00508534 /* MyCouponsHeaderTableViewCell.swift */; }; |
| ... | @@ -162,6 +170,14 @@ | ... | @@ -162,6 +170,14 @@ |
| 162 | 626AF6DC2F699081008BCA08 /* MapViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapViewController.swift; sourceTree = "<group>"; }; | 170 | 626AF6DC2F699081008BCA08 /* MapViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapViewController.swift; sourceTree = "<group>"; }; |
| 163 | 626AF6DD2F699081008BCA08 /* MapViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MapViewController.xib; sourceTree = "<group>"; }; | 171 | 626AF6DD2F699081008BCA08 /* MapViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MapViewController.xib; sourceTree = "<group>"; }; |
| 164 | 626DC8002F6ACA3B00CFC8C2 /* CarouselItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarouselItemModel.swift; sourceTree = "<group>"; }; | 172 | 626DC8002F6ACA3B00CFC8C2 /* CarouselItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarouselItemModel.swift; sourceTree = "<group>"; }; |
| 173 | + 627B9C732F6C3EB000A2456F /* CategoryOffersViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CategoryOffersViewController.swift; sourceTree = "<group>"; }; | ||
| 174 | + 627B9C742F6C3EB000A2456F /* CategoryOffersViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CategoryOffersViewController.xib; sourceTree = "<group>"; }; | ||
| 175 | + 627B9C782F6C438500A2456F /* CategoryOfferCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CategoryOfferCollectionViewCell.swift; sourceTree = "<group>"; }; | ||
| 176 | + 627B9C792F6C438500A2456F /* CategoryOfferCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CategoryOfferCollectionViewCell.xib; sourceTree = "<group>"; }; | ||
| 177 | + 627B9C7D2F6C48E800A2456F /* CategoryOffersHeaderTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CategoryOffersHeaderTableViewCell.swift; sourceTree = "<group>"; }; | ||
| 178 | + 627B9C7E2F6C48E800A2456F /* CategoryOffersHeaderTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CategoryOffersHeaderTableViewCell.xib; sourceTree = "<group>"; }; | ||
| 179 | + 627B9C822F6C492F00A2456F /* CategoryOffersGridTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CategoryOffersGridTableViewCell.swift; sourceTree = "<group>"; }; | ||
| 180 | + 627B9C832F6C492F00A2456F /* CategoryOffersGridTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CategoryOffersGridTableViewCell.xib; sourceTree = "<group>"; }; | ||
| 165 | 62A0A6D12F67FEDC00508534 /* MyCouponsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyCouponsViewController.swift; sourceTree = "<group>"; }; | 181 | 62A0A6D12F67FEDC00508534 /* MyCouponsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyCouponsViewController.swift; sourceTree = "<group>"; }; |
| 166 | 62A0A6D22F67FEDC00508534 /* MyCouponsViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MyCouponsViewController.xib; sourceTree = "<group>"; }; | 182 | 62A0A6D22F67FEDC00508534 /* MyCouponsViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MyCouponsViewController.xib; sourceTree = "<group>"; }; |
| 167 | 62A0A6D62F680C6A00508534 /* MyCouponsHeaderTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyCouponsHeaderTableViewCell.swift; sourceTree = "<group>"; }; | 183 | 62A0A6D62F680C6A00508534 /* MyCouponsHeaderTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyCouponsHeaderTableViewCell.swift; sourceTree = "<group>"; }; |
| ... | @@ -340,6 +356,7 @@ | ... | @@ -340,6 +356,7 @@ |
| 340 | 1EA8E5B42DDF315600CD3418 /* screens */ = { | 356 | 1EA8E5B42DDF315600CD3418 /* screens */ = { |
| 341 | isa = PBXGroup; | 357 | isa = PBXGroup; |
| 342 | children = ( | 358 | children = ( |
| 359 | + 627B9C722F6C3E9800A2456F /* CategoryOffersViewController */, | ||
| 343 | 626AF6D92F698F96008BCA08 /* MapViewController */, | 360 | 626AF6D92F698F96008BCA08 /* MapViewController */, |
| 344 | 622DA0AB2F51CA9100308AB8 /* CouponsetViewController */, | 361 | 622DA0AB2F51CA9100308AB8 /* CouponsetViewController */, |
| 345 | 1EBE45642E02DDF90055A0D4 /* CampaignViewController */, | 362 | 1EBE45642E02DDF90055A0D4 /* CampaignViewController */, |
| ... | @@ -354,6 +371,9 @@ | ... | @@ -354,6 +371,9 @@ |
| 354 | 1EA8E5BC2DDF34FB00CD3418 /* cells */ = { | 371 | 1EA8E5BC2DDF34FB00CD3418 /* cells */ = { |
| 355 | isa = PBXGroup; | 372 | isa = PBXGroup; |
| 356 | children = ( | 373 | children = ( |
| 374 | + 627B9C812F6C491900A2456F /* CategoryOffersGridTableViewCell */, | ||
| 375 | + 627B9C7C2F6C48CE00A2456F /* CategoryOffersHeaderTableViewCell */, | ||
| 376 | + 627B9C772F6C434F00A2456F /* CategoryOfferCollectionViewCell */, | ||
| 357 | 62A0A6D52F680C1E00508534 /* MyCouponsHeaderTableViewCell */, | 377 | 62A0A6D52F680C1E00508534 /* MyCouponsHeaderTableViewCell */, |
| 358 | 1EDBAF122DE844C500911E79 /* ProfileFilterCollectionViewCell */, | 378 | 1EDBAF122DE844C500911E79 /* ProfileFilterCollectionViewCell */, |
| 359 | 1EDBAF012DE8439000911E79 /* ProfileCouponTableViewCell */, | 379 | 1EDBAF012DE8439000911E79 /* ProfileCouponTableViewCell */, |
| ... | @@ -469,6 +489,42 @@ | ... | @@ -469,6 +489,42 @@ |
| 469 | path = MapViewController; | 489 | path = MapViewController; |
| 470 | sourceTree = "<group>"; | 490 | sourceTree = "<group>"; |
| 471 | }; | 491 | }; |
| 492 | + 627B9C722F6C3E9800A2456F /* CategoryOffersViewController */ = { | ||
| 493 | + isa = PBXGroup; | ||
| 494 | + children = ( | ||
| 495 | + 627B9C732F6C3EB000A2456F /* CategoryOffersViewController.swift */, | ||
| 496 | + 627B9C742F6C3EB000A2456F /* CategoryOffersViewController.xib */, | ||
| 497 | + ); | ||
| 498 | + path = CategoryOffersViewController; | ||
| 499 | + sourceTree = "<group>"; | ||
| 500 | + }; | ||
| 501 | + 627B9C772F6C434F00A2456F /* CategoryOfferCollectionViewCell */ = { | ||
| 502 | + isa = PBXGroup; | ||
| 503 | + children = ( | ||
| 504 | + 627B9C782F6C438500A2456F /* CategoryOfferCollectionViewCell.swift */, | ||
| 505 | + 627B9C792F6C438500A2456F /* CategoryOfferCollectionViewCell.xib */, | ||
| 506 | + ); | ||
| 507 | + path = CategoryOfferCollectionViewCell; | ||
| 508 | + sourceTree = "<group>"; | ||
| 509 | + }; | ||
| 510 | + 627B9C7C2F6C48CE00A2456F /* CategoryOffersHeaderTableViewCell */ = { | ||
| 511 | + isa = PBXGroup; | ||
| 512 | + children = ( | ||
| 513 | + 627B9C7D2F6C48E800A2456F /* CategoryOffersHeaderTableViewCell.swift */, | ||
| 514 | + 627B9C7E2F6C48E800A2456F /* CategoryOffersHeaderTableViewCell.xib */, | ||
| 515 | + ); | ||
| 516 | + path = CategoryOffersHeaderTableViewCell; | ||
| 517 | + sourceTree = "<group>"; | ||
| 518 | + }; | ||
| 519 | + 627B9C812F6C491900A2456F /* CategoryOffersGridTableViewCell */ = { | ||
| 520 | + isa = PBXGroup; | ||
| 521 | + children = ( | ||
| 522 | + 627B9C822F6C492F00A2456F /* CategoryOffersGridTableViewCell.swift */, | ||
| 523 | + 627B9C832F6C492F00A2456F /* CategoryOffersGridTableViewCell.xib */, | ||
| 524 | + ); | ||
| 525 | + path = CategoryOffersGridTableViewCell; | ||
| 526 | + sourceTree = "<group>"; | ||
| 527 | + }; | ||
| 472 | 62A0A6D02F67FE8100508534 /* MyCouponsViewController */ = { | 528 | 62A0A6D02F67FE8100508534 /* MyCouponsViewController */ = { |
| 473 | isa = PBXGroup; | 529 | isa = PBXGroup; |
| 474 | children = ( | 530 | children = ( |
| ... | @@ -655,9 +711,12 @@ | ... | @@ -655,9 +711,12 @@ |
| 655 | 1EDBAF082DE843FB00911E79 /* ProfileCouponFiltersTableViewCell.xib in Resources */, | 711 | 1EDBAF082DE843FB00911E79 /* ProfileCouponFiltersTableViewCell.xib in Resources */, |
| 656 | 1EBE45682E02DE9A0055A0D4 /* CampaignViewController.xib in Resources */, | 712 | 1EBE45682E02DE9A0055A0D4 /* CampaignViewController.xib in Resources */, |
| 657 | 1EDBAF042DE843CA00911E79 /* ProfileCouponTableViewCell.xib in Resources */, | 713 | 1EDBAF042DE843CA00911E79 /* ProfileCouponTableViewCell.xib in Resources */, |
| 714 | + 627B9C762F6C3EB000A2456F /* CategoryOffersViewController.xib in Resources */, | ||
| 658 | 1EDBAF0C2DE8441000911E79 /* ProfileQuestionnaireTableViewCell.xib in Resources */, | 715 | 1EDBAF0C2DE8441000911E79 /* ProfileQuestionnaireTableViewCell.xib in Resources */, |
| 659 | E6A77A38282BC3530045BBA8 /* Media.xcassets in Resources */, | 716 | E6A77A38282BC3530045BBA8 /* Media.xcassets in Resources */, |
| 717 | + 627B9C852F6C492F00A2456F /* CategoryOffersGridTableViewCell.xib in Resources */, | ||
| 660 | 1E116F682DE845B1009AE791 /* ProfileFilterCollectionViewCell.xib in Resources */, | 718 | 1E116F682DE845B1009AE791 /* ProfileFilterCollectionViewCell.xib in Resources */, |
| 719 | + 627B9C7B2F6C438500A2456F /* CategoryOfferCollectionViewCell.xib in Resources */, | ||
| 661 | 1EB4F4252DE09AAC00D934C0 /* MyRewardsBannerOffersScrollTableViewCell.xib in Resources */, | 720 | 1EB4F4252DE09AAC00D934C0 /* MyRewardsBannerOffersScrollTableViewCell.xib in Resources */, |
| 662 | 62A0A6D92F680C6A00508534 /* MyCouponsHeaderTableViewCell.xib in Resources */, | 721 | 62A0A6D92F680C6A00508534 /* MyCouponsHeaderTableViewCell.xib in Resources */, |
| 663 | 1EA8E5C02DDF427A00CD3418 /* PingLCG-Bold.otf in Resources */, | 722 | 1EA8E5C02DDF427A00CD3418 /* PingLCG-Bold.otf in Resources */, |
| ... | @@ -672,6 +731,7 @@ | ... | @@ -672,6 +731,7 @@ |
| 672 | 1EDBAF102DE8443B00911E79 /* ProfileHeaderTableViewCell.xib in Resources */, | 731 | 1EDBAF102DE8443B00911E79 /* ProfileHeaderTableViewCell.xib in Resources */, |
| 673 | 1E917CDB2DDF68C7002221D8 /* CouponViewController.xib in Resources */, | 732 | 1E917CDB2DDF68C7002221D8 /* CouponViewController.xib in Resources */, |
| 674 | 1E917CE02DDF6909002221D8 /* ProfileViewController.xib in Resources */, | 733 | 1E917CE02DDF6909002221D8 /* ProfileViewController.xib in Resources */, |
| 734 | + 627B9C802F6C48E800A2456F /* CategoryOffersHeaderTableViewCell.xib in Resources */, | ||
| 675 | ); | 735 | ); |
| 676 | runOnlyForDeploymentPostprocessing = 0; | 736 | runOnlyForDeploymentPostprocessing = 0; |
| 677 | }; | 737 | }; |
| ... | @@ -723,6 +783,7 @@ | ... | @@ -723,6 +783,7 @@ |
| 723 | 1E089DFC2DF87C39007459F1 /* Merchant.swift in Sources */, | 783 | 1E089DFC2DF87C39007459F1 /* Merchant.swift in Sources */, |
| 724 | 1E0E724B2E0C3B6C00BC926F /* TokenRefreshManager.swift in Sources */, | 784 | 1E0E724B2E0C3B6C00BC926F /* TokenRefreshManager.swift in Sources */, |
| 725 | 1E089DFD2DF87C39007459F1 /* Campaign.swift in Sources */, | 785 | 1E089DFD2DF87C39007459F1 /* Campaign.swift in Sources */, |
| 786 | + 627B9C842F6C492F00A2456F /* CategoryOffersGridTableViewCell.swift in Sources */, | ||
| 726 | 1E089E062DF87CED007459F1 /* Endpoints.swift in Sources */, | 787 | 1E089E062DF87CED007459F1 /* Endpoints.swift in Sources */, |
| 727 | 1E089E072DF87CED007459F1 /* NetworkService.swift in Sources */, | 788 | 1E089E072DF87CED007459F1 /* NetworkService.swift in Sources */, |
| 728 | 1EBE45672E02DE9A0055A0D4 /* CampaignViewController.swift in Sources */, | 789 | 1EBE45672E02DE9A0055A0D4 /* CampaignViewController.swift in Sources */, |
| ... | @@ -742,6 +803,7 @@ | ... | @@ -742,6 +803,7 @@ |
| 742 | E6A77955282933E70045BBA8 /* ViewControllerExtensions.swift in Sources */, | 803 | E6A77955282933E70045BBA8 /* ViewControllerExtensions.swift in Sources */, |
| 743 | A07936762885E9CC00064122 /* UIColorExtensions.swift in Sources */, | 804 | A07936762885E9CC00064122 /* UIColorExtensions.swift in Sources */, |
| 744 | 1EB4F42C2DE0A0AF00D934C0 /* MyRewardsOffersScrollTableViewCell.swift in Sources */, | 805 | 1EB4F42C2DE0A0AF00D934C0 /* MyRewardsOffersScrollTableViewCell.swift in Sources */, |
| 806 | + 627B9C752F6C3EB000A2456F /* CategoryOffersViewController.swift in Sources */, | ||
| 745 | 62A0A6D32F67FEDC00508534 /* MyCouponsViewController.swift in Sources */, | 807 | 62A0A6D32F67FEDC00508534 /* MyCouponsViewController.swift in Sources */, |
| 746 | 1E089E022DF87CCF007459F1 /* WarplySDK.swift in Sources */, | 808 | 1E089E022DF87CCF007459F1 /* WarplySDK.swift in Sources */, |
| 747 | 1E0E723B2E0C3AE400BC926F /* DatabaseConfiguration.swift in Sources */, | 809 | 1E0E723B2E0C3AE400BC926F /* DatabaseConfiguration.swift in Sources */, |
| ... | @@ -760,6 +822,8 @@ | ... | @@ -760,6 +822,8 @@ |
| 760 | 626AF6DE2F699081008BCA08 /* MapViewController.swift in Sources */, | 822 | 626AF6DE2F699081008BCA08 /* MapViewController.swift in Sources */, |
| 761 | 1EDBAF112DE8443B00911E79 /* ProfileHeaderTableViewCell.swift in Sources */, | 823 | 1EDBAF112DE8443B00911E79 /* ProfileHeaderTableViewCell.swift in Sources */, |
| 762 | 1EDBAF052DE843CA00911E79 /* ProfileCouponTableViewCell.swift in Sources */, | 824 | 1EDBAF052DE843CA00911E79 /* ProfileCouponTableViewCell.swift in Sources */, |
| 825 | + 627B9C7A2F6C438500A2456F /* CategoryOfferCollectionViewCell.swift in Sources */, | ||
| 826 | + 627B9C7F2F6C48E800A2456F /* CategoryOffersHeaderTableViewCell.swift in Sources */, | ||
| 763 | 626AF6DB2F698FF1008BCA08 /* MerchantAnnotation.swift in Sources */, | 827 | 626AF6DB2F698FF1008BCA08 /* MerchantAnnotation.swift in Sources */, |
| 764 | 1EB4F4262DE09AAC00D934C0 /* MyRewardsBannerOffersScrollTableViewCell.swift in Sources */, | 828 | 1EB4F4262DE09AAC00D934C0 /* MyRewardsBannerOffersScrollTableViewCell.swift in Sources */, |
| 765 | ); | 829 | ); | ... | ... |
No preview for this file type
| 1 | +// | ||
| 2 | +// CategoryOfferCollectionViewCell.swift | ||
| 3 | +// SwiftWarplyFramework | ||
| 4 | +// | ||
| 5 | +// Created by Manos Chorianopoulos on 19/3/26. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import UIKit | ||
| 9 | + | ||
| 10 | +@objc(CategoryOfferCollectionViewCell) | ||
| 11 | +public class CategoryOfferCollectionViewCell: UICollectionViewCell { | ||
| 12 | + | ||
| 13 | + public override func awakeFromNib() { | ||
| 14 | + super.awakeFromNib() | ||
| 15 | + // Initialization code | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | +} |
| 1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | ||
| 3 | + <dependencies> | ||
| 4 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/> | ||
| 5 | + <capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
| 6 | + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
| 7 | + </dependencies> | ||
| 8 | + <objects> | ||
| 9 | + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> | ||
| 10 | + <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | ||
| 11 | + <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="CategoryOfferCollectionViewCell" customModuleProvider="target"> | ||
| 12 | + <rect key="frame" x="0.0" y="0.0" width="50" height="50"/> | ||
| 13 | + <autoresizingMask key="autoresizingMask"/> | ||
| 14 | + <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> | ||
| 15 | + <rect key="frame" x="0.0" y="0.0" width="50" height="50"/> | ||
| 16 | + <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> | ||
| 17 | + </view> | ||
| 18 | + <viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/> | ||
| 19 | + </collectionViewCell> | ||
| 20 | + </objects> | ||
| 21 | +</document> |
| 1 | +// | ||
| 2 | +// CategoryOffersGridTableViewCell.swift | ||
| 3 | +// SwiftWarplyFramework | ||
| 4 | +// | ||
| 5 | +// Created by Manos Chorianopoulos on 19/3/26. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import UIKit | ||
| 9 | + | ||
| 10 | +@objc(CategoryOffersGridTableViewCell) | ||
| 11 | +public class CategoryOffersGridTableViewCell: UITableViewCell { | ||
| 12 | + | ||
| 13 | + @IBOutlet weak var collectionView: UICollectionView! | ||
| 14 | + @IBOutlet weak var collectionViewHeightConstraint: NSLayoutConstraint! | ||
| 15 | + | ||
| 16 | + var data: SectionModel? | ||
| 17 | + weak var parentViewController: UIViewController? | ||
| 18 | + | ||
| 19 | + public override func awakeFromNib() { | ||
| 20 | + super.awakeFromNib() | ||
| 21 | + // Initialization code | ||
| 22 | + | ||
| 23 | + setupCollectionView() | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + public override func setSelected(_ selected: Bool, animated: Bool) { | ||
| 27 | + super.setSelected(selected, animated: animated) | ||
| 28 | + // Configure the view for the selected state | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + private func setupCollectionView() { | ||
| 32 | + collectionView.delegate = self | ||
| 33 | + collectionView.dataSource = self | ||
| 34 | + collectionView.backgroundColor = .clear | ||
| 35 | + collectionView.isScrollEnabled = false // Scroll is handled by the outer TableView | ||
| 36 | + | ||
| 37 | + XIBLoader.registerCollectionViewCell( | ||
| 38 | + collectionView, | ||
| 39 | + cellClass: UICollectionViewCell.self, | ||
| 40 | + nibName: "CategoryOfferCollectionViewCell", | ||
| 41 | + identifier: "CategoryOfferCollectionViewCell" | ||
| 42 | + ) | ||
| 43 | + | ||
| 44 | + if let layout = collectionView.collectionViewLayout as? UICollectionViewFlowLayout { | ||
| 45 | + layout.minimumInteritemSpacing = 16 | ||
| 46 | + layout.minimumLineSpacing = 16 | ||
| 47 | + layout.sectionInset = UIEdgeInsets(top: 16, left: 16, bottom: 16, right: 16) | ||
| 48 | + } | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + func configureCell(with sectionData: SectionModel?, parentViewController: UIViewController?) { | ||
| 52 | + self.data = sectionData | ||
| 53 | + self.parentViewController = parentViewController | ||
| 54 | + | ||
| 55 | + collectionView.reloadData() | ||
| 56 | + | ||
| 57 | + // Use layoutIfNeeded to calculate content size and set the height constraint | ||
| 58 | + collectionView.layoutIfNeeded() | ||
| 59 | + let height = collectionView.collectionViewLayout.collectionViewContentSize.height | ||
| 60 | + collectionViewHeightConstraint.constant = height | ||
| 61 | + } | ||
| 62 | +} | ||
| 63 | + | ||
| 64 | +extension CategoryOffersGridTableViewCell: UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout { | ||
| 65 | + | ||
| 66 | + public func numberOfSections(in collectionView: UICollectionView) -> Int { | ||
| 67 | + return 1 | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { | ||
| 71 | + return self.data?.itemCount ?? 0 | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | ||
| 75 | + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "CategoryOfferCollectionViewCell", for: indexPath) as! CategoryOfferCollectionViewCell | ||
| 76 | + | ||
| 77 | + guard let data = self.data, | ||
| 78 | + let items = data.items, | ||
| 79 | + indexPath.row < items.count else { | ||
| 80 | + return cell | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + switch data.itemType { | ||
| 84 | + case .couponSets: | ||
| 85 | + if let couponSet = items[indexPath.row] as? CouponSetItemModel { | ||
| 86 | + cell.configureCell(data: couponSet) | ||
| 87 | + } | ||
| 88 | + default: | ||
| 89 | + if let offer = items[indexPath.row] as? OfferModel { | ||
| 90 | + cell.configureCell(data: offer) | ||
| 91 | + } | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + return cell | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { | ||
| 98 | + guard let data = self.data, | ||
| 99 | + let items = data.items, | ||
| 100 | + indexPath.row < items.count else { | ||
| 101 | + return | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + // Handle navigation based on item type | ||
| 105 | + switch data.itemType { | ||
| 106 | + case .couponSets: | ||
| 107 | + if let couponSet = items[indexPath.row] as? CouponSetItemModel { | ||
| 108 | + let storyboard = UIStoryboard(name: "Main", bundle: Bundle.frameworkResourceBundle) | ||
| 109 | + if let vc = storyboard.instantiateViewController(withIdentifier: "CouponsetViewController") as? CouponsetViewController { | ||
| 110 | + vc.couponset = couponSet | ||
| 111 | + self.parentViewController?.navigationController?.pushViewController(vc, animated: true) | ||
| 112 | + } | ||
| 113 | + } | ||
| 114 | + default: | ||
| 115 | + if let offer = items[indexPath.row] as? OfferModel { | ||
| 116 | + // Determine if it's a campaign or other offer and navigate appropriately | ||
| 117 | + // (Using existing patterns from MyRewardsViewController) | ||
| 118 | + let storyboard = UIStoryboard(name: "Main", bundle: Bundle.frameworkResourceBundle) | ||
| 119 | + if let vc = storyboard.instantiateViewController(withIdentifier: "CampaignViewController") as? CampaignViewController { | ||
| 120 | + vc.campaignUrl = offer.campaignUrl // Assuming OfferModel has this | ||
| 121 | + self.parentViewController?.navigationController?.pushViewController(vc, animated: true) | ||
| 122 | + } | ||
| 123 | + } | ||
| 124 | + } | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { | ||
| 128 | + // Calculate width for 2 columns with spacing | ||
| 129 | + let padding: CGFloat = 16 * 3 // left + middle + right padding | ||
| 130 | + let availableWidth = collectionView.frame.width - padding | ||
| 131 | + let itemWidth = availableWidth / 2 | ||
| 132 | + | ||
| 133 | + // Adjust height as needed based on design (aspect ratio or fixed) | ||
| 134 | + let itemHeight = itemWidth * 1.3 // Approximation from screenshot | ||
| 135 | + | ||
| 136 | + return CGSize(width: itemWidth, height: itemHeight) | ||
| 137 | + } | ||
| 138 | +} |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="24506" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | ||
| 3 | + <device id="retina6_12" orientation="portrait" appearance="light"/> | ||
| 4 | + <dependencies> | ||
| 5 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="24504"/> | ||
| 6 | + <capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
| 7 | + <capability name="System colors in document resources" minToolsVersion="11.0"/> | ||
| 8 | + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
| 9 | + </dependencies> | ||
| 10 | + <objects> | ||
| 11 | + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> | ||
| 12 | + <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | ||
| 13 | + <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="CategoryOffersGridTableViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> | ||
| 14 | + <rect key="frame" x="0.0" y="0.0" width="320" height="200"/> | ||
| 15 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
| 16 | + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> | ||
| 17 | + <rect key="frame" x="0.0" y="0.0" width="320" height="200"/> | ||
| 18 | + <autoresizingMask key="autoresizingMask"/> | ||
| 19 | + <subviews> | ||
| 20 | + <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="6q1-8v-H6d"> | ||
| 21 | + <rect key="frame" x="0.0" y="0.0" width="320" height="200"/> | ||
| 22 | + <color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
| 23 | + <constraints> | ||
| 24 | + <constraint firstAttribute="height" constant="200" id="E2S-dE-z3n"/> | ||
| 25 | + </constraints> | ||
| 26 | + <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="g5b-eS-1Jq"> | ||
| 27 | + <size key="itemSize" width="128" height="128"/> | ||
| 28 | + <size key="headerReferenceSize" width="0.0" height="0.0"/> | ||
| 29 | + <size key="footerReferenceSize" width="0.0" height="0.0"/> | ||
| 30 | + <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/> | ||
| 31 | + </collectionViewFlowLayout> | ||
| 32 | + </collectionView> | ||
| 33 | + </subviews> | ||
| 34 | + <constraints> | ||
| 35 | + <constraint firstAttribute="bottom" secondItem="6q1-8v-H6d" secondAttribute="bottom" id="D01-9c-29T"/> | ||
| 36 | + <constraint firstAttribute="trailing" secondItem="6q1-8v-H6d" secondAttribute="trailing" id="D3B-e1-2jZ"/> | ||
| 37 | + <constraint firstItem="6q1-8v-H6d" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="O63-T2-B2y"/> | ||
| 38 | + <constraint firstItem="6q1-8v-H6d" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="YjY-W1-T3M"/> | ||
| 39 | + </constraints> | ||
| 40 | + </tableViewCellContentView> | ||
| 41 | + <viewLayoutGuide key="safeArea" id="njF-e1-oar"/> | ||
| 42 | + <connections> | ||
| 43 | + <outlet property="collectionView" destination="6q1-8v-H6d" id="N8a-1a-1yO"/> | ||
| 44 | + <outlet property="collectionViewHeightConstraint" destination="E2S-dE-z3n" id="A8b-Zc-3rZ"/> | ||
| 45 | + </connections> | ||
| 46 | + <point key="canvasLocation" x="141" y="20"/> | ||
| 47 | + </tableViewCell> | ||
| 48 | + </objects> | ||
| 49 | + <resources> | ||
| 50 | + <systemColor name="systemBackgroundColor"> | ||
| 51 | + <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
| 52 | + </systemColor> | ||
| 53 | + </resources> | ||
| 54 | +</document> |
| 1 | +// | ||
| 2 | +// CategoryOffersHeaderTableViewCell.swift | ||
| 3 | +// SwiftWarplyFramework | ||
| 4 | +// | ||
| 5 | +// Created by Manos Chorianopoulos on 19/3/26. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import UIKit | ||
| 9 | + | ||
| 10 | +@objc(CategoryOffersHeaderTableViewCell) | ||
| 11 | +public class CategoryOffersHeaderTableViewCell: UITableViewCell { | ||
| 12 | + @IBOutlet weak var headerLabel: UILabel! | ||
| 13 | + @IBOutlet weak var filtersView: UIView! | ||
| 14 | + @IBOutlet weak var filtersLabel: UILabel! | ||
| 15 | + @IBOutlet weak var filtersImage: UIImageView! | ||
| 16 | + @IBOutlet weak var mapView: UIView! | ||
| 17 | + @IBOutlet weak var mapImage: UIImageView! | ||
| 18 | + | ||
| 19 | + public override func awakeFromNib() { | ||
| 20 | + super.awakeFromNib() | ||
| 21 | + // Initialization code | ||
| 22 | + | ||
| 23 | + self.headerLabel.text = "" | ||
| 24 | + self.headerLabel.font = UIFont(name: "PingLCG-Bold", size: 24) | ||
| 25 | + self.headerLabel.textColor = UIColor(rgb: 0x0D1B29) | ||
| 26 | + self.headerLabel.frame.size.width = self.headerLabel.intrinsicContentSize.width | ||
| 27 | + self.headerLabel.frame.size.height = self.headerLabel.intrinsicContentSize.height | ||
| 28 | + | ||
| 29 | + self.filtersView.backgroundColor = UIColor(rgb: 0xF1F2F4) | ||
| 30 | + self.filtersView.layer.cornerRadius = 16 // Assuming height is 32 or similar based on standard chip design | ||
| 31 | + self.filtersView.layer.masksToBounds = true | ||
| 32 | + | ||
| 33 | + self.filtersLabel.text = "Αναζήτηση" | ||
| 34 | + self.filtersLabel.font = UIFont(name: "PingLCG-Regular", size: 16) | ||
| 35 | + self.filtersLabel.textColor = UIColor(rgb: 0x000F1E) | ||
| 36 | + self.filtersLabel.frame.size.width = self.filtersLabel.intrinsicContentSize.width | ||
| 37 | + self.filtersLabel.frame.size.height = self.filtersLabel.intrinsicContentSize.height | ||
| 38 | + | ||
| 39 | + self.filtersImage.image = UIImage(named: "filter", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) | ||
| 40 | + | ||
| 41 | + if mapView != nil { | ||
| 42 | + self.mapView.backgroundColor = UIColor(rgb: 0xF1F2F4) | ||
| 43 | + self.mapView.layer.cornerRadius = 22 // Assuming height is 44 | ||
| 44 | + self.mapView.layer.masksToBounds = true | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + if mapImage != nil { | ||
| 48 | + self.mapImage.image = UIImage(named: "ic_map", in: Bundle.frameworkResourceBundle, compatibleWith: nil) | ||
| 49 | + } | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + public override func setSelected(_ selected: Bool, animated: Bool) { | ||
| 53 | + super.setSelected(selected, animated: animated) | ||
| 54 | + | ||
| 55 | + // Configure the view for the selected state | ||
| 56 | + } | ||
| 57 | +} |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="24506" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | ||
| 3 | + <device id="retina6_12" orientation="portrait" appearance="light"/> | ||
| 4 | + <dependencies> | ||
| 5 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="24504"/> | ||
| 6 | + <capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
| 7 | + <capability name="System colors in document resources" minToolsVersion="11.0"/> | ||
| 8 | + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
| 9 | + </dependencies> | ||
| 10 | + <objects> | ||
| 11 | + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> | ||
| 12 | + <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | ||
| 13 | + <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="100" id="KGk-i7-Jjw" customClass="CategoryOffersHeaderTableViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> | ||
| 14 | + <rect key="frame" x="0.0" y="0.0" width="375" height="100"/> | ||
| 15 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
| 16 | + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> | ||
| 17 | + <rect key="frame" x="0.0" y="0.0" width="375" height="100"/> | ||
| 18 | + <autoresizingMask key="autoresizingMask"/> | ||
| 19 | + <subviews> | ||
| 20 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZCw-Ll-zwM" userLabel="HeaderView"> | ||
| 21 | + <rect key="frame" x="0.0" y="0.0" width="375" height="100"/> | ||
| 22 | + <subviews> | ||
| 23 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cBC-6g-plR" userLabel="HeaderLabel"> | ||
| 24 | + <rect key="frame" x="18" y="10" width="339" height="29"/> | ||
| 25 | + <fontDescription key="fontDescription" type="system" pointSize="24"/> | ||
| 26 | + <nil key="textColor"/> | ||
| 27 | + <nil key="highlightedColor"/> | ||
| 28 | + </label> | ||
| 29 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uCx-Us-JUI" userLabel="FiltersView"> | ||
| 30 | + <rect key="frame" x="18" y="49" width="125" height="32"/> | ||
| 31 | + <subviews> | ||
| 32 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Αναζήτηση" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sDK-OF-lXa" userLabel="FiltersLabel"> | ||
| 33 | + <rect key="frame" x="12" y="5.6666666666666643" width="79" height="21"/> | ||
| 34 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
| 35 | + <nil key="textColor"/> | ||
| 36 | + <nil key="highlightedColor"/> | ||
| 37 | + </label> | ||
| 38 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="3Xf-bL-CdH" userLabel="Filters Image View"> | ||
| 39 | + <rect key="frame" x="97" y="8" width="16" height="16"/> | ||
| 40 | + <constraints> | ||
| 41 | + <constraint firstAttribute="width" constant="16" id="YhY-z1-ejZ"/> | ||
| 42 | + <constraint firstAttribute="height" constant="16" id="kYH-vQ-nxs"/> | ||
| 43 | + </constraints> | ||
| 44 | + </imageView> | ||
| 45 | + </subviews> | ||
| 46 | + <color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
| 47 | + <constraints> | ||
| 48 | + <constraint firstItem="sDK-OF-lXa" firstAttribute="leading" secondItem="uCx-Us-JUI" secondAttribute="leading" constant="12" id="1bJ-2D-9G2"/> | ||
| 49 | + <constraint firstItem="3Xf-bL-CdH" firstAttribute="centerY" secondItem="uCx-Us-JUI" secondAttribute="centerY" id="5aO-bF-8t8"/> | ||
| 50 | + <constraint firstAttribute="height" constant="32" id="Pqa-c3-bwe"/> | ||
| 51 | + <constraint firstAttribute="trailing" secondItem="3Xf-bL-CdH" secondAttribute="trailing" constant="12" id="a7L-Ll-tLr"/> | ||
| 52 | + <constraint firstItem="sDK-OF-lXa" firstAttribute="centerY" secondItem="uCx-Us-JUI" secondAttribute="centerY" id="maL-1h-ry9"/> | ||
| 53 | + <constraint firstItem="3Xf-bL-CdH" firstAttribute="leading" secondItem="sDK-OF-lXa" secondAttribute="trailing" constant="6" id="tLf-zt-nxJ"/> | ||
| 54 | + </constraints> | ||
| 55 | + </view> | ||
| 56 | + | ||
| 57 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="map-bg-view" userLabel="MapView"> | ||
| 58 | + <rect key="frame" x="313" y="43" width="44" height="44"/> | ||
| 59 | + <subviews> | ||
| 60 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="map-icon-img" userLabel="Map Image View"> | ||
| 61 | + <rect key="frame" x="12" y="12" width="20" height="20"/> | ||
| 62 | + <constraints> | ||
| 63 | + <constraint firstAttribute="width" constant="20" id="M1X-bS-b6A"/> | ||
| 64 | + <constraint firstAttribute="height" constant="20" id="M1X-bS-b6B"/> | ||
| 65 | + </constraints> | ||
| 66 | + </imageView> | ||
| 67 | + </subviews> | ||
| 68 | + <color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
| 69 | + <constraints> | ||
| 70 | + <constraint firstItem="map-icon-img" firstAttribute="centerX" secondItem="map-bg-view" secondAttribute="centerX" id="M1X-bS-b6C"/> | ||
| 71 | + <constraint firstItem="map-icon-img" firstAttribute="centerY" secondItem="map-bg-view" secondAttribute="centerY" id="M1X-bS-b6D"/> | ||
| 72 | + <constraint firstAttribute="width" constant="44" id="M1X-bS-b6E"/> | ||
| 73 | + <constraint firstAttribute="height" constant="44" id="M1X-bS-b6F"/> | ||
| 74 | + </constraints> | ||
| 75 | + </view> | ||
| 76 | + | ||
| 77 | + </subviews> | ||
| 78 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
| 79 | + <constraints> | ||
| 80 | + <constraint firstItem="uCx-Us-JUI" firstAttribute="leading" secondItem="ZCw-Ll-zwM" secondAttribute="leading" constant="18" id="6Ex-bt-5yV"/> | ||
| 81 | + <constraint firstAttribute="trailing" secondItem="cBC-6g-plR" secondAttribute="trailing" constant="18" id="Cqb-tb-tvv"/> | ||
| 82 | + <constraint firstItem="uCx-Us-JUI" firstAttribute="top" secondItem="cBC-6g-plR" secondAttribute="bottom" constant="10" id="GXj-Xe-Vsr"/> | ||
| 83 | + <constraint firstAttribute="bottom" secondItem="uCx-Us-JUI" secondAttribute="bottom" constant="19" id="gNr-Kw-YvL"/> | ||
| 84 | + <constraint firstItem="cBC-6g-plR" firstAttribute="top" secondItem="ZCw-Ll-zwM" secondAttribute="top" constant="10" id="nwy-UX-mnC"/> | ||
| 85 | + <constraint firstItem="cBC-6g-plR" firstAttribute="leading" secondItem="ZCw-Ll-zwM" secondAttribute="leading" constant="18" id="wiM-Yd-Hmd"/> | ||
| 86 | + | ||
| 87 | + <constraint firstAttribute="trailing" secondItem="map-bg-view" secondAttribute="trailing" constant="18" id="M1X-bS-b6G"/> | ||
| 88 | + <constraint firstItem="map-bg-view" firstAttribute="centerY" secondItem="uCx-Us-JUI" secondAttribute="centerY" id="M1X-bS-b6H"/> | ||
| 89 | + </constraints> | ||
| 90 | + </view> | ||
| 91 | + </subviews> | ||
| 92 | + <constraints> | ||
| 93 | + <constraint firstItem="ZCw-Ll-zwM" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="cRF-Vh-enF"/> | ||
| 94 | + <constraint firstAttribute="bottom" secondItem="ZCw-Ll-zwM" secondAttribute="bottom" id="gEL-mg-txR"/> | ||
| 95 | + <constraint firstItem="ZCw-Ll-zwM" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="rsN-TO-MVS"/> | ||
| 96 | + <constraint firstAttribute="trailing" secondItem="ZCw-Ll-zwM" secondAttribute="trailing" id="slO-cF-esX"/> | ||
| 97 | + </constraints> | ||
| 98 | + </tableViewCellContentView> | ||
| 99 | + <viewLayoutGuide key="safeArea" id="njF-e1-oar"/> | ||
| 100 | + <connections> | ||
| 101 | + <outlet property="filtersImage" destination="3Xf-bL-CdH" id="3Xf-bL-CdI"/> | ||
| 102 | + <outlet property="filtersLabel" destination="sDK-OF-lXa" id="sDK-OF-lXb"/> | ||
| 103 | + <outlet property="filtersView" destination="uCx-Us-JUI" id="uCx-Us-JUJ"/> | ||
| 104 | + <outlet property="headerLabel" destination="cBC-6g-plR" id="cBC-6g-plS"/> | ||
| 105 | + <outlet property="mapImage" destination="map-icon-img" id="map-icon-img-1"/> | ||
| 106 | + <outlet property="mapView" destination="map-bg-view" id="map-bg-view-1"/> | ||
| 107 | + </connections> | ||
| 108 | + <point key="canvasLocation" x="141.22137404580153" y="154.22535211267606"/> | ||
| 109 | + </tableViewCell> | ||
| 110 | + </objects> | ||
| 111 | + <resources> | ||
| 112 | + <systemColor name="systemBackgroundColor"> | ||
| 113 | + <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
| 114 | + </systemColor> | ||
| 115 | + </resources> | ||
| 116 | +</document> |
| 1 | +// | ||
| 2 | +// CategoryOffersViewController.swift | ||
| 3 | +// SwiftWarplyFramework | ||
| 4 | +// | ||
| 5 | +// Created by Manos Chorianopoulos on 19/3/26. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import UIKit | ||
| 9 | + | ||
| 10 | +@objc public class CategoryOffersViewController: UIViewController { | ||
| 11 | + | ||
| 12 | + @IBOutlet weak var tableView: UITableView! | ||
| 13 | + | ||
| 14 | + public var sectionData: SectionModel? | ||
| 15 | + | ||
| 16 | + public override func viewDidLoad() { | ||
| 17 | + super.viewDidLoad() | ||
| 18 | + | ||
| 19 | + self.navigationController?.setNavigationBarHidden(false, animated: false) | ||
| 20 | + setBackButton() | ||
| 21 | + | ||
| 22 | + setupTableView() | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + private func setupTableView() { | ||
| 26 | + tableView.delegate = self | ||
| 27 | + tableView.dataSource = self | ||
| 28 | + | ||
| 29 | + tableView.separatorStyle = .none | ||
| 30 | + tableView.backgroundColor = .white | ||
| 31 | + | ||
| 32 | + tableView.register(UINib(nibName: "CategoryOffersHeaderTableViewCell", bundle: Bundle.frameworkResourceBundle), forCellReuseIdentifier: "CategoryOffersHeaderTableViewCell") | ||
| 33 | + tableView.register(UINib(nibName: "CategoryOffersGridTableViewCell", bundle: Bundle.frameworkResourceBundle), forCellReuseIdentifier: "CategoryOffersGridTableViewCell") | ||
| 34 | + } | ||
| 35 | +} | ||
| 36 | + | ||
| 37 | +extension CategoryOffersViewController: UITableViewDelegate, UITableViewDataSource { | ||
| 38 | + public func numberOfSections(in tableView: UITableView) -> Int { | ||
| 39 | + return 1 | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
| 43 | + return 2 // Header + Grid | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
| 47 | + if indexPath.row == 0 { | ||
| 48 | + let cell = tableView.dequeueReusableCell(withIdentifier: "CategoryOffersHeaderTableViewCell", for: indexPath) as! CategoryOffersHeaderTableViewCell | ||
| 49 | + if let title = sectionData?.title { | ||
| 50 | + cell.headerLabel.text = title | ||
| 51 | + } | ||
| 52 | + return cell | ||
| 53 | + } else { | ||
| 54 | + let cell = tableView.dequeueReusableCell(withIdentifier: "CategoryOffersGridTableViewCell", for: indexPath) as! CategoryOffersGridTableViewCell | ||
| 55 | + cell.configureCell(with: sectionData, parentViewController: self) | ||
| 56 | + return cell | ||
| 57 | + } | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | ||
| 61 | + if indexPath.row == 0 { | ||
| 62 | + return UITableView.automaticDimension | ||
| 63 | + } else { | ||
| 64 | + return UITableView.automaticDimension // Or a calculated height depending on content | ||
| 65 | + } | ||
| 66 | + } | ||
| 67 | +} |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="24506" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | ||
| 3 | + <device id="retina6_12" orientation="portrait" appearance="light"/> | ||
| 4 | + <dependencies> | ||
| 5 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="24504"/> | ||
| 6 | + <capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
| 7 | + <capability name="System colors in document resources" minToolsVersion="11.0"/> | ||
| 8 | + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
| 9 | + </dependencies> | ||
| 10 | + <objects> | ||
| 11 | + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="CategoryOffersViewController" customModule="SwiftWarplyFramework" customModuleProvider="target"> | ||
| 12 | + <connections> | ||
| 13 | + <outlet property="tableView" destination="xJ1-8b-ZQa" id="zFv-3o-xR8"/> | ||
| 14 | + <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> | ||
| 15 | + </connections> | ||
| 16 | + </placeholder> | ||
| 17 | + <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | ||
| 18 | + <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> | ||
| 19 | + <rect key="frame" x="0.0" y="0.0" width="393" height="852"/> | ||
| 20 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
| 21 | + <subviews> | ||
| 22 | + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="xJ1-8b-ZQa"> | ||
| 23 | + <rect key="frame" x="0.0" y="59" width="393" height="759"/> | ||
| 24 | + <color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
| 25 | + </tableView> | ||
| 26 | + </subviews> | ||
| 27 | + <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> | ||
| 28 | + <color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
| 29 | + <constraints> | ||
| 30 | + <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="xJ1-8b-ZQa" secondAttribute="bottom" id="D5R-hF-Lz4"/> | ||
| 31 | + <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="xJ1-8b-ZQa" secondAttribute="trailing" id="LhI-M4-0eB"/> | ||
| 32 | + <constraint firstItem="xJ1-8b-ZQa" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="O6f-Kk-Ufe"/> | ||
| 33 | + <constraint firstItem="xJ1-8b-ZQa" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="aT8-Zg-Kk4"/> | ||
| 34 | + </constraints> | ||
| 35 | + <point key="canvasLocation" x="65" y="154"/> | ||
| 36 | + </view> | ||
| 37 | + </objects> | ||
| 38 | + <resources> | ||
| 39 | + <systemColor name="systemBackgroundColor"> | ||
| 40 | + <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
| 41 | + </systemColor> | ||
| 42 | + </resources> | ||
| 43 | +</document> |
-
Please register or login to post a comment