Manos Chorianopoulos

add CouponViewController

......@@ -8,6 +8,7 @@
/* Begin PBXBuildFile section */
1E7564BA2823C6D900B9D2AE /* ViewControllerExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E7564B92823C6D900B9D2AE /* ViewControllerExtensions.swift */; };
1E7564BC2823FE0B00B9D2AE /* CouponViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E7564BB2823FE0B00B9D2AE /* CouponViewController.swift */; };
260C6A1AFF7560C32E212F20 /* Pods_WarplySDKFrameworkIOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1353B8C484CC0649CAC2EB74 /* Pods_WarplySDKFrameworkIOS.framework */; };
E634A369282299770069DE27 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E634A368282299760069DE27 /* Main.storyboard */; };
E634A36B2822999B0069DE27 /* CouponsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E634A36A2822999B0069DE27 /* CouponsViewController.swift */; };
......@@ -137,6 +138,7 @@
/* Begin PBXFileReference section */
1353B8C484CC0649CAC2EB74 /* Pods_WarplySDKFrameworkIOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_WarplySDKFrameworkIOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1E7564B92823C6D900B9D2AE /* ViewControllerExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewControllerExtensions.swift; sourceTree = "<group>"; };
1E7564BB2823FE0B00B9D2AE /* CouponViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponViewController.swift; sourceTree = "<group>"; };
B9413513157AD76ECE896B81 /* Pods-WarplySDKFrameworkIOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WarplySDKFrameworkIOS.release.xcconfig"; path = "Target Support Files/Pods-WarplySDKFrameworkIOS/Pods-WarplySDKFrameworkIOS.release.xcconfig"; sourceTree = "<group>"; };
E634A368282299760069DE27 /* Main.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
E634A36A2822999B0069DE27 /* CouponsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponsViewController.swift; sourceTree = "<group>"; };
......@@ -336,6 +338,7 @@
E67D1EC528117F2400940F01 /* swiftApi.swift */,
E634A368282299760069DE27 /* Main.storyboard */,
E634A36A2822999B0069DE27 /* CouponsViewController.swift */,
1E7564BB2823FE0B00B9D2AE /* CouponViewController.swift */,
E634A36E2823D2290069DE27 /* WalletViewController.swift */,
E634A3702823D26E0069DE27 /* GiftsViewController.swift */,
E634A3722823D3690069DE27 /* DetailsViewController.swift */,
......@@ -757,6 +760,7 @@
E6D8DF3127A942920006A3A9 /* AFNetworkActivityIndicatorManager.m in Sources */,
E6D8DF3D27A942920006A3A9 /* AFAutoPurgingImageCache.m in Sources */,
E6D8DF0A27A942920006A3A9 /* WLAPSItem.m in Sources */,
1E7564BC2823FE0B00B9D2AE /* CouponViewController.swift in Sources */,
E6D8DF2C27A942920006A3A9 /* UIProgressView+AFNetworking.m in Sources */,
E6D8DF3C27A942920006A3A9 /* UIWebView+AFNetworking.m in Sources */,
E6D8DF1427A942920006A3A9 /* WLLocationManager.m in Sources */,
......
//
// CouponViewController.swift
// WarplySDKFrameworkIOS
//
// Created by Manos Chorianopoulos on 5/5/22.
//
import UIKit
class CouponViewController: UIViewController {
@IBOutlet weak var mainView: UIView!
@IBOutlet weak var scrollContentView: UIView!
@IBOutlet weak var couponImageHeight: NSLayoutConstraint!
@IBOutlet weak var redeemButton: UIButton!
@IBOutlet weak var termsLabel: UILabel!
let uiscreen: CGRect = UIScreen.main.bounds
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
setBackButton()
setNavigationTitle("Εκπτωτικό κουπόνι")
mainView.clipsToBounds = true
mainView.layer.cornerRadius = 30
mainView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
couponImageHeight.constant = self.uiscreen.height * 0.25
redeemButton.titleLabel?.font = UIFont.systemFont(ofSize: 15, weight: .medium)
termsLabel.font = UIFont.systemFont(ofSize: 14, weight: UIFont.Weight.medium)
let tap = UITapGestureRecognizer(target: self, action: #selector(CouponViewController.termsTapFunction))
termsLabel.isUserInteractionEnabled = true
termsLabel.addGestureRecognizer(tap)
}
// MARK: - Actions
@objc func termsTapFunction(sender:UITapGestureRecognizer) {
print("Terms tapped!")
}
@IBAction func redeemButtomAction(_ sender: Any) {
print("redeem Buttom Pressed!")
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
<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"/>
......@@ -12,7 +12,7 @@
<!--Coupons View Controller-->
<scene sceneID="s0d-6b-0kx">
<objects>
<viewController storyboardIdentifier="CouponsViewController" id="zti-Lv-RCc" customClass="CouponsViewController" customModule="swift_example" customModuleProvider="target" sceneMemberID="viewController">
<viewController storyboardIdentifier="CouponsViewController" id="zti-Lv-RCc" customClass="CouponsViewController" customModule="WarplySDKFrameworkIOS" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="OHf-ga-xvH">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
......@@ -97,8 +97,139 @@
</objects>
<point key="canvasLocation" x="1612" y="129"/>
</scene>
<!--Coupon View Controller-->
<scene sceneID="yGm-Im-aAN">
<objects>
<viewController storyboardIdentifier="CouponViewController" id="S8k-2D-tGT" customClass="CouponViewController" customModule="WarplySDKFrameworkIOS" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="JM4-xN-bgp">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Jqu-cp-CWU">
<rect key="frame" x="0.0" y="54" width="414" height="842"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1N5-oA-ZTb">
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
<subviews>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uTN-Qr-wBi">
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="3SX-fR-ph2">
<rect key="frame" x="0.0" y="0.0" width="414" height="200"/>
<constraints>
<constraint firstAttribute="height" constant="200" id="zUx-Yd-in7"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Πάρε δωρεάν μηνιαία πακέτα με πάνες στα supermarket Σκλαβενίτης!" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="isU-Qv-94G">
<rect key="frame" x="20" y="230" width="341" height="38.5"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<color key="textColor" red="0.25490196078431371" green="0.33333333333333331" blue="0.39215686274509803" alpha="0.84705882352941175" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Χρησιμοποίησε τον παρακάτω κωδικό και πάρε δωρεάν πακέτο πάνες Pampers αποκλειστικά στα Supermarket Σκλαβενίτης" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dSA-lM-N5v">
<rect key="frame" x="20" y="298.5" width="361.5" height="50.5"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="0.84705882349999995" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" ambiguous="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FCd-hv-dHg">
<rect key="frame" x="30" y="716" width="354" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="n2w-Tx-hhO"/>
</constraints>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="Απόκτησέ το">
<backgroundConfiguration key="background" cornerRadius="7">
<color key="backgroundColor" red="0.47450980390000003" green="0.74901960779999999" blue="0.078431372550000003" alpha="0.84705882349999995" colorSpace="calibratedRGB"/>
</backgroundConfiguration>
<fontDescription key="titleFontDescription" type="system" weight="medium" pointSize="15"/>
<color key="baseForegroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</buttonConfiguration>
<connections>
<action selector="redeemButtomAction:" destination="S8k-2D-tGT" eventType="touchUpInside" id="ygO-66-Dsl"/>
</connections>
</button>
<label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9Wc-e3-KgW">
<rect key="frame" x="20" y="796" width="374" height="16"/>
<attributedString key="attributedText">
<fragment content="Όροι χρήσης">
<attributes>
<color key="NSColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="0.84705882349999995" colorSpace="calibratedRGB"/>
<font key="NSFont" metaFont="system" size="14"/>
<paragraphStyle key="NSParagraphStyle" alignment="center" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
<integer key="NSUnderline" value="1"/>
</attributes>
</fragment>
</attributedString>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="dSA-lM-N5v" firstAttribute="leading" secondItem="uTN-Qr-wBi" secondAttribute="leading" constant="20" id="6B9-Tx-YcO"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="isU-Qv-94G" secondAttribute="trailing" constant="20" id="7cL-ob-hXY"/>
<constraint firstItem="9Wc-e3-KgW" firstAttribute="leading" secondItem="uTN-Qr-wBi" secondAttribute="leading" constant="20" id="91Z-y9-N6s"/>
<constraint firstItem="FCd-hv-dHg" firstAttribute="leading" secondItem="uTN-Qr-wBi" secondAttribute="leading" constant="30" id="DYG-XQ-tco"/>
<constraint firstAttribute="trailing" secondItem="FCd-hv-dHg" secondAttribute="trailing" constant="30" id="KJ4-Vf-6ti"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="dSA-lM-N5v" secondAttribute="trailing" constant="20" id="LZq-UM-EE3"/>
<constraint firstItem="isU-Qv-94G" firstAttribute="leading" secondItem="uTN-Qr-wBi" secondAttribute="leading" constant="20" id="PR6-tJ-tw0"/>
<constraint firstAttribute="trailing" secondItem="3SX-fR-ph2" secondAttribute="trailing" id="WJj-1Q-Erx"/>
<constraint firstAttribute="bottom" secondItem="9Wc-e3-KgW" secondAttribute="bottom" constant="30" id="dJ7-Kz-ne0"/>
<constraint firstItem="9Wc-e3-KgW" firstAttribute="top" secondItem="FCd-hv-dHg" secondAttribute="bottom" constant="30" id="dTv-Rx-rpW"/>
<constraint firstItem="dSA-lM-N5v" firstAttribute="top" secondItem="isU-Qv-94G" secondAttribute="bottom" constant="30" id="k8m-Rf-p7u"/>
<constraint firstItem="3SX-fR-ph2" firstAttribute="leading" secondItem="uTN-Qr-wBi" secondAttribute="leading" id="nBV-nm-wOq"/>
<constraint firstAttribute="trailing" secondItem="9Wc-e3-KgW" secondAttribute="trailing" constant="20" id="nsf-fZ-63s"/>
<constraint firstItem="3SX-fR-ph2" firstAttribute="top" secondItem="uTN-Qr-wBi" secondAttribute="top" id="oaX-KH-TEh"/>
<constraint firstItem="isU-Qv-94G" firstAttribute="top" secondItem="3SX-fR-ph2" secondAttribute="bottom" constant="30" id="vQf-lC-GgG"/>
<constraint firstItem="FCd-hv-dHg" firstAttribute="top" relation="greaterThanOrEqual" secondItem="dSA-lM-N5v" secondAttribute="bottom" constant="60" id="x3c-xH-QFZ"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="uTN-Qr-wBi" firstAttribute="bottom" secondItem="Fnc-An-qkX" secondAttribute="bottom" id="47I-ua-377"/>
<constraint firstItem="uTN-Qr-wBi" firstAttribute="trailing" secondItem="Fnc-An-qkX" secondAttribute="trailing" id="9jH-1A-Uwt"/>
<constraint firstItem="uTN-Qr-wBi" firstAttribute="top" secondItem="Fnc-An-qkX" secondAttribute="top" id="BqH-63-Oj0"/>
<constraint firstItem="uTN-Qr-wBi" firstAttribute="width" secondItem="ffd-ce-497" secondAttribute="width" id="HN8-nm-LRD"/>
<constraint firstItem="uTN-Qr-wBi" firstAttribute="leading" secondItem="Fnc-An-qkX" secondAttribute="leading" id="uZ3-6g-W5e"/>
</constraints>
<viewLayoutGuide key="contentLayoutGuide" id="Fnc-An-qkX"/>
<viewLayoutGuide key="frameLayoutGuide" id="ffd-ce-497"/>
</scrollView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="1N5-oA-ZTb" firstAttribute="leading" secondItem="Jqu-cp-CWU" secondAttribute="leading" id="6xu-Fr-ayy"/>
<constraint firstItem="uTN-Qr-wBi" firstAttribute="height" relation="greaterThanOrEqual" secondItem="Jqu-cp-CWU" secondAttribute="height" id="IW1-Sy-djh"/>
<constraint firstAttribute="trailing" secondItem="1N5-oA-ZTb" secondAttribute="trailing" id="dQR-wy-Qcd"/>
<constraint firstItem="1N5-oA-ZTb" firstAttribute="top" secondItem="Jqu-cp-CWU" secondAttribute="top" id="g8J-5T-9Mg"/>
<constraint firstAttribute="bottom" secondItem="1N5-oA-ZTb" secondAttribute="bottom" id="kaG-d8-5oJ"/>
</constraints>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="TUZ-8z-puM"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="Jqu-cp-CWU" secondAttribute="bottom" id="ANm-zp-vX6"/>
<constraint firstItem="Jqu-cp-CWU" firstAttribute="top" secondItem="JM4-xN-bgp" secondAttribute="topMargin" constant="10" id="ST9-WE-ewd"/>
<constraint firstAttribute="trailing" secondItem="Jqu-cp-CWU" secondAttribute="trailing" id="eQx-vL-Dfd"/>
<constraint firstItem="Jqu-cp-CWU" firstAttribute="leading" secondItem="JM4-xN-bgp" secondAttribute="leading" id="kQx-xb-czQ"/>
</constraints>
</view>
<connections>
<outlet property="couponImageHeight" destination="zUx-Yd-in7" id="NWw-aF-GEM"/>
<outlet property="mainView" destination="Jqu-cp-CWU" id="cLA-eX-Av4"/>
<outlet property="redeemButton" destination="FCd-hv-dHg" id="blu-64-lZt"/>
<outlet property="scrollContentView" destination="uTN-Qr-wBi" id="atF-nT-J6Y"/>
<outlet property="termsLabel" destination="9Wc-e3-KgW" id="2Z0-nm-mAy"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="zFf-Es-4zg" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2341" y="129"/>
</scene>
</scenes>
<resources>
<image name="coupons_scrollview" width="214" height="463.5"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
......