Manos Chorianopoulos

add PopupMerchantCategoriesViewController

......@@ -65,6 +65,7 @@
1EDD4F892AE937AA00A6B5A6 /* LoyaltyHistoryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EDD4F882AE937AA00A6B5A6 /* LoyaltyHistoryViewController.swift */; };
1EE67DA32AE2AF2B0057C8CC /* UnifiedCouponsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EE67DA22AE2AF2B0057C8CC /* UnifiedCouponsViewController.swift */; };
1EEC5C582CC15C4600CF3CAC /* PopupMerchantsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EEC5C572CC15C4600CF3CAC /* PopupMerchantsViewController.swift */; };
1EFBAB942CC65C9B001DFF75 /* PopupMerchantCategoriesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EFBAB932CC65C9B001DFF75 /* PopupMerchantCategoriesViewController.swift */; };
7630AD9A6242D60846D6750C /* Pods_SwiftWarplyFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0D5F56DD4E5371A50AD2D87 /* Pods_SwiftWarplyFramework.framework */; };
A02F34052882B6E60086465F /* TelcoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A02F34042882B6E60086465F /* TelcoViewController.swift */; };
A04D31DE288FF670000E43B5 /* HistoryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A04D31DD288FF670000E43B5 /* HistoryViewController.swift */; };
......@@ -261,6 +262,7 @@
1EDD4F882AE937AA00A6B5A6 /* LoyaltyHistoryViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoyaltyHistoryViewController.swift; sourceTree = "<group>"; };
1EE67DA22AE2AF2B0057C8CC /* UnifiedCouponsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnifiedCouponsViewController.swift; sourceTree = "<group>"; };
1EEC5C572CC15C4600CF3CAC /* PopupMerchantsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopupMerchantsViewController.swift; sourceTree = "<group>"; };
1EFBAB932CC65C9B001DFF75 /* PopupMerchantCategoriesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopupMerchantCategoriesViewController.swift; sourceTree = "<group>"; };
A02F34042882B6E60086465F /* TelcoViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TelcoViewController.swift; sourceTree = "<group>"; };
A04D31DD288FF670000E43B5 /* HistoryViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HistoryViewController.swift; sourceTree = "<group>"; };
A079366D2885D07700064122 /* AnalysisChildViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalysisChildViewController.swift; sourceTree = "<group>"; };
......@@ -576,6 +578,7 @@
1EEC5C572CC15C4600CF3CAC /* PopupMerchantsViewController.swift */,
1E56DF722CC249B300F71882 /* MerchantTableViewCell.swift */,
1E56DF742CC2620000F71882 /* PopupMerchantsFooterTableViewCell.swift */,
1EFBAB932CC65C9B001DFF75 /* PopupMerchantCategoriesViewController.swift */,
E6A77860282933E40045BBA8 /* MyApi.h */,
E6A778DC282933E60045BBA8 /* MyApi.m */,
E6A77862282933E50045BBA8 /* MyEmptyClass.swift */,
......@@ -1092,6 +1095,7 @@
1E7B9A5829F6ACF400B37E13 /* WalletBannersTableViewCell.swift in Sources */,
E6A778FF282933E60045BBA8 /* WLBeacon.m in Sources */,
1E029A4329E0031600CC7447 /* UnifiedCouponBCFooterTableViewCell.swift in Sources */,
1EFBAB942CC65C9B001DFF75 /* PopupMerchantCategoriesViewController.swift in Sources */,
E6A7791A282933E60045BBA8 /* WLAPPActionHandler.m in Sources */,
E6A778E1282933E60045BBA8 /* CouponViewController.swift in Sources */,
E6A77924282933E70045BBA8 /* NSString+SSToolkitAdditions.m in Sources */,
......
//
// PopupMerchantCategoriesViewController.swift
// SwiftWarplyFramework
//
// Created by Manos Chorianopoulos on 21/10/24.
//
import UIKit
class PopupMerchantCategoriesViewController: UIViewController {
@IBOutlet weak var popupView: UIView!
@IBOutlet weak var headerLabel: UILabel!
@IBOutlet weak var closeButton: UIButton!
@IBOutlet weak var mapButton: UIButton!
@IBOutlet weak var eshopsButton: UIButton!
public var headerText: String? = ""
override func viewDidLoad() {
super.viewDidLoad()
popupView.clipsToBounds = true
popupView.layer.cornerRadius = 16
popupView.layer.maskedCorners = [ .layerMinXMinYCorner, .layerMaxXMinYCorner] // Top left, right corner radius
closeButton.setImage(UIImage(named: "ic_close_3.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
closeButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5)
headerLabel.text = self.headerText
headerLabel.font = UIFont(name: "BTCosmo-Bold", size: 18)
headerLabel.textColor = UIColor(rgb: 0x000000)
headerLabel.isHidden = true
mapButton.titleLabel?.font = UIFont(name: "PeridotPE-SBold", size: 17)
mapButton.setTitle("Βρες το στα supermarket", for: .normal)
mapButton.setTitleColor(.white, for: .normal)
mapButton.backgroundColor = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00)
mapButton.layer.cornerRadius = 16.0
mapButton.frame = CGRect(x: 0.0, y: 0.0, width: 312, height: 55)
eshopsButton.titleLabel?.font = UIFont(name: "PeridotPE-Bold", size: 17)
eshopsButton.setTitle("Δώρισέ το", for: .normal)
eshopsButton.setTitleColor(UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00), for: .normal)
eshopsButton.layer.cornerRadius = 15.0
eshopsButton.frame = CGRect(x: 0.0, y: 0.0, width: 312, height: 55)
eshopsButton.backgroundColor = .clear
eshopsButton.layer.borderWidth = 2
eshopsButton.layer.borderColor = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00).cgColor
}
// MARK: - UIButton Actions
@IBAction func closeButtonAction(_ sender: Any) {
self.dismiss(animated: true, completion: {})
}
@IBAction func mapButtonAction(_ sender: Any) {
swiftApi().logTrackersEvent("click", "SeeShops")
let vc = SwiftWarplyFramework.MapsViewController(nibName: "MapsViewController", bundle: Bundle(for: MyEmptyClass.self))
// vc.couponSet = coupon?.couponset_data
vc.isMarket = true
self.navigationController?.pushViewController(vc, animated: true)
}
@IBAction func eshopsButtonAction(_ sender: Any) {
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
if let popupVC = storyboard.instantiateViewController(withIdentifier: "PopupMerchantsViewController") as? SwiftWarplyFramework.PopupMerchantsViewController {
popupVC.modalPresentationStyle = .overCurrentContext
popupVC.modalTransitionStyle = .crossDissolve
// popupVC.coupon = coupon
popupVC.headerText = "Δες τα eshop"
popupVC.buttonTitle = "Δες το eshop"
// popupVC.buttonIcon = "shopping_cart"
popupVC.footerText = "Η διαθεσιμότητα ενδέχεται να διαφέρει ανάλογα με την τοποθεσία."
self.present(popupVC, animated: true, completion: nil)
}
}
}
......@@ -160,13 +160,26 @@ import SwiftEventBus
}
@IBAction func mapButtonAction(_ sender: Any) {
swiftApi().logTrackersEvent("click", "SeeShops")
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
if let popupVC = storyboard.instantiateViewController(withIdentifier: "PopupMerchantCategoriesViewController") as? SwiftWarplyFramework.PopupMerchantCategoriesViewController {
popupVC.modalPresentationStyle = .overCurrentContext
popupVC.modalTransitionStyle = .crossDissolve
// popupVC.coupon = coupon
self.present(popupVC, animated: true, completion: nil)
}
// =======
// swiftApi().logTrackersEvent("click", "SeeShops")
//
let vc = SwiftWarplyFramework.MapsViewController(nibName: "MapsViewController", bundle: Bundle(for: MyEmptyClass.self))
// vc.couponSet = coupon?.couponset_data
vc.isMarket = true
self.navigationController?.pushViewController(vc, animated: true)
// let vc = SwiftWarplyFramework.MapsViewController(nibName: "MapsViewController", bundle: Bundle(for: MyEmptyClass.self))
//// vc.couponSet = coupon?.couponset_data
// vc.isMarket = true
// self.navigationController?.pushViewController(vc, animated: true)
// =======
// if (mapBtnVisible == true) {
// swiftApi().logTrackersEvent("click", "SeeShops")
......