Showing
17 changed files
with
977 additions
and
20 deletions
No preview for this file type
... | @@ -11,6 +11,9 @@ | ... | @@ -11,6 +11,9 @@ |
11 | 1E74838D28378AF40042A589 /* CouponBarcodeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E74838C28378AF40042A589 /* CouponBarcodeViewController.swift */; }; | 11 | 1E74838D28378AF40042A589 /* CouponBarcodeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E74838C28378AF40042A589 /* CouponBarcodeViewController.swift */; }; |
12 | 1EA1AF0A2835346A008998AA /* CouponsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EA1AF092835346A008998AA /* CouponsTableViewCell.swift */; }; | 12 | 1EA1AF0A2835346A008998AA /* CouponsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EA1AF092835346A008998AA /* CouponsTableViewCell.swift */; }; |
13 | 1EA2BB792865BFE8003F2AB0 /* InboxTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EA2BB782865BFE8003F2AB0 /* InboxTableViewCell.swift */; }; | 13 | 1EA2BB792865BFE8003F2AB0 /* InboxTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EA2BB782865BFE8003F2AB0 /* InboxTableViewCell.swift */; }; |
14 | + 1EB236AB28816B680063777A /* ShareViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB236AA28816B680063777A /* ShareViewController.swift */; }; | ||
15 | + 1EB236AD28816C560063777A /* NumberPopupViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB236AC28816C560063777A /* NumberPopupViewController.swift */; }; | ||
16 | + 1EB236AF28816CAC0063777A /* NumbersTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB236AE28816CAB0063777A /* NumbersTableViewCell.swift */; }; | ||
14 | 1EB5F4C828536FD60016F36E /* StepsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB5F4C728536FD60016F36E /* StepsViewController.swift */; }; | 17 | 1EB5F4C828536FD60016F36E /* StepsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB5F4C728536FD60016F36E /* StepsViewController.swift */; }; |
15 | 1EB5F4CA285370C90016F36E /* LoyaltyAnalysisViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB5F4C9285370C90016F36E /* LoyaltyAnalysisViewController.swift */; }; | 18 | 1EB5F4CA285370C90016F36E /* LoyaltyAnalysisViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB5F4C9285370C90016F36E /* LoyaltyAnalysisViewController.swift */; }; |
16 | 1EBE97212865EE460080EFF7 /* MFYInboxTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EBE97202865EE460080EFF7 /* MFYInboxTableViewCell.swift */; }; | 19 | 1EBE97212865EE460080EFF7 /* MFYInboxTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EBE97202865EE460080EFF7 /* MFYInboxTableViewCell.swift */; }; |
... | @@ -148,6 +151,9 @@ | ... | @@ -148,6 +151,9 @@ |
148 | 1E74838C28378AF40042A589 /* CouponBarcodeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponBarcodeViewController.swift; sourceTree = "<group>"; }; | 151 | 1E74838C28378AF40042A589 /* CouponBarcodeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponBarcodeViewController.swift; sourceTree = "<group>"; }; |
149 | 1EA1AF092835346A008998AA /* CouponsTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponsTableViewCell.swift; sourceTree = "<group>"; }; | 152 | 1EA1AF092835346A008998AA /* CouponsTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponsTableViewCell.swift; sourceTree = "<group>"; }; |
150 | 1EA2BB782865BFE8003F2AB0 /* InboxTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InboxTableViewCell.swift; sourceTree = "<group>"; }; | 153 | 1EA2BB782865BFE8003F2AB0 /* InboxTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InboxTableViewCell.swift; sourceTree = "<group>"; }; |
154 | + 1EB236AA28816B680063777A /* ShareViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareViewController.swift; sourceTree = "<group>"; }; | ||
155 | + 1EB236AC28816C560063777A /* NumberPopupViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberPopupViewController.swift; sourceTree = "<group>"; }; | ||
156 | + 1EB236AE28816CAB0063777A /* NumbersTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumbersTableViewCell.swift; sourceTree = "<group>"; }; | ||
151 | 1EB5F4C728536FD60016F36E /* StepsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StepsViewController.swift; sourceTree = "<group>"; }; | 157 | 1EB5F4C728536FD60016F36E /* StepsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StepsViewController.swift; sourceTree = "<group>"; }; |
152 | 1EB5F4C9285370C90016F36E /* LoyaltyAnalysisViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoyaltyAnalysisViewController.swift; sourceTree = "<group>"; }; | 158 | 1EB5F4C9285370C90016F36E /* LoyaltyAnalysisViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoyaltyAnalysisViewController.swift; sourceTree = "<group>"; }; |
153 | 1EBE97202865EE460080EFF7 /* MFYInboxTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MFYInboxTableViewCell.swift; sourceTree = "<group>"; }; | 159 | 1EBE97202865EE460080EFF7 /* MFYInboxTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MFYInboxTableViewCell.swift; sourceTree = "<group>"; }; |
... | @@ -350,6 +356,9 @@ | ... | @@ -350,6 +356,9 @@ |
350 | E6A77A35282BB4CB0045BBA8 /* MakeItAPresentViewController.swift */, | 356 | E6A77A35282BB4CB0045BBA8 /* MakeItAPresentViewController.swift */, |
351 | E6A7785A282933E40045BBA8 /* Helpers */, | 357 | E6A7785A282933E40045BBA8 /* Helpers */, |
352 | E6A77861282933E50045BBA8 /* Main.storyboard */, | 358 | E6A77861282933E50045BBA8 /* Main.storyboard */, |
359 | + 1EB236AA28816B680063777A /* ShareViewController.swift */, | ||
360 | + 1EB236AC28816C560063777A /* NumberPopupViewController.swift */, | ||
361 | + 1EB236AE28816CAB0063777A /* NumbersTableViewCell.swift */, | ||
353 | 1EB5F4C9285370C90016F36E /* LoyaltyAnalysisViewController.swift */, | 362 | 1EB5F4C9285370C90016F36E /* LoyaltyAnalysisViewController.swift */, |
354 | 1EB5F4C728536FD60016F36E /* StepsViewController.swift */, | 363 | 1EB5F4C728536FD60016F36E /* StepsViewController.swift */, |
355 | E6A77860282933E40045BBA8 /* MyApi.h */, | 364 | E6A77860282933E40045BBA8 /* MyApi.h */, |
... | @@ -803,6 +812,7 @@ | ... | @@ -803,6 +812,7 @@ |
803 | E6A77A36282BB4CB0045BBA8 /* MakeItAPresentViewController.swift in Sources */, | 812 | E6A77A36282BB4CB0045BBA8 /* MakeItAPresentViewController.swift in Sources */, |
804 | E6A77947282933E70045BBA8 /* FMDatabaseQueue.m in Sources */, | 813 | E6A77947282933E70045BBA8 /* FMDatabaseQueue.m in Sources */, |
805 | E6A77922282933E60045BBA8 /* NSData+SSToolkitAdditions.m in Sources */, | 814 | E6A77922282933E60045BBA8 /* NSData+SSToolkitAdditions.m in Sources */, |
815 | + 1EB236AB28816B680063777A /* ShareViewController.swift in Sources */, | ||
806 | E6A778E7282933E60045BBA8 /* DetailsViewController.swift in Sources */, | 816 | E6A778E7282933E60045BBA8 /* DetailsViewController.swift in Sources */, |
807 | 1EB5F4CA285370C90016F36E /* LoyaltyAnalysisViewController.swift in Sources */, | 817 | 1EB5F4CA285370C90016F36E /* LoyaltyAnalysisViewController.swift in Sources */, |
808 | E6A7794A282933E70045BBA8 /* FMDatabaseAdditions.m in Sources */, | 818 | E6A7794A282933E70045BBA8 /* FMDatabaseAdditions.m in Sources */, |
... | @@ -816,7 +826,9 @@ | ... | @@ -816,7 +826,9 @@ |
816 | E6A77924282933E70045BBA8 /* NSString+SSToolkitAdditions.m in Sources */, | 826 | E6A77924282933E70045BBA8 /* NSString+SSToolkitAdditions.m in Sources */, |
817 | E6A7792A282933E70045BBA8 /* AFNetworkActivityIndicatorManager.m in Sources */, | 827 | E6A7792A282933E70045BBA8 /* AFNetworkActivityIndicatorManager.m in Sources */, |
818 | E6A77914282933E60045BBA8 /* WLUserManager.m in Sources */, | 828 | E6A77914282933E60045BBA8 /* WLUserManager.m in Sources */, |
829 | + 1EB236AF28816CAC0063777A /* NumbersTableViewCell.swift in Sources */, | ||
819 | E6A7794F282933E70045BBA8 /* FMDatabasePool.m in Sources */, | 830 | E6A7794F282933E70045BBA8 /* FMDatabasePool.m in Sources */, |
831 | + 1EB236AD28816C560063777A /* NumberPopupViewController.swift in Sources */, | ||
820 | E6A778E3282933E60045BBA8 /* WalletViewController.swift in Sources */, | 832 | E6A778E3282933E60045BBA8 /* WalletViewController.swift in Sources */, |
821 | E6A7790C282933E60045BBA8 /* WLBeaconManager.m in Sources */, | 833 | E6A7790C282933E60045BBA8 /* WLBeaconManager.m in Sources */, |
822 | E6A77940282933E70045BBA8 /* AFURLSessionManager.m in Sources */, | 834 | E6A77940282933E70045BBA8 /* AFURLSessionManager.m in Sources */, | ... | ... |
No preview for this file type
... | @@ -164,25 +164,10 @@ import AVFoundation | ... | @@ -164,25 +164,10 @@ import AVFoundation |
164 | // MARK: - Actions | 164 | // MARK: - Actions |
165 | 165 | ||
166 | @IBAction func redeemButtomAction(_ sender: Any) { | 166 | @IBAction func redeemButtomAction(_ sender: Any) { |
167 | - // TODO: Add redeem action | 167 | + let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
168 | - | 168 | + let vc = storyboard.instantiateViewController(withIdentifier: "ShareViewController") as! SwiftWarplyFramework.ShareViewController |
169 | - // SwiftEventBus.post("couponBarcodeRedeem", sender: coupon) | 169 | + vc.coupon = self.coupon |
170 | - | 170 | + self.navigationController?.pushViewController(vc, animated: true) |
171 | - let alert = UIAlertController(title: "Το κουπόνι σου ενεργοποιήθηκε", message: "Μπορείς να το βρεις στην αρχική οθόνη της εφαρμογής και στην ενότητα ενεργά δώρα!", preferredStyle: .alert) | ||
172 | - alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in | ||
173 | - switch action.style{ | ||
174 | - case .default: | ||
175 | - print("default") | ||
176 | - | ||
177 | - case .cancel: | ||
178 | - print("cancel") | ||
179 | - | ||
180 | - case .destructive: | ||
181 | - print("destructive") | ||
182 | - | ||
183 | - } | ||
184 | - })) | ||
185 | - self.present(alert, animated: true, completion: nil) | ||
186 | } | 171 | } |
187 | 172 | ||
188 | @IBAction func termsButtonAction(_ sender: Any) { | 173 | @IBAction func termsButtonAction(_ sender: Any) { | ... | ... |
... | @@ -1190,6 +1190,361 @@ | ... | @@ -1190,6 +1190,361 @@ |
1190 | </objects> | 1190 | </objects> |
1191 | <point key="canvasLocation" x="2341" y="-555"/> | 1191 | <point key="canvasLocation" x="2341" y="-555"/> |
1192 | </scene> | 1192 | </scene> |
1193 | + <!--Share View Controller--> | ||
1194 | + <scene sceneID="9Hy-jH-czs"> | ||
1195 | + <objects> | ||
1196 | + <viewController storyboardIdentifier="ShareViewController" id="hwy-nc-4N0" customClass="ShareViewController" customModule="SwiftWarplyFramework" customModuleProvider="target" sceneMemberID="viewController"> | ||
1197 | + <view key="view" contentMode="scaleToFill" id="Nlq-Bo-JaK"> | ||
1198 | + <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> | ||
1199 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
1200 | + <subviews> | ||
1201 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="y5q-8M-0jB"> | ||
1202 | + <rect key="frame" x="0.0" y="44" width="414" height="852"/> | ||
1203 | + <subviews> | ||
1204 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="coupons_scrollview_white" translatesAutoresizingMaskIntoConstraints="NO" id="QF0-ih-7ii"> | ||
1205 | + <rect key="frame" x="0.0" y="0.0" width="414" height="852"/> | ||
1206 | + </imageView> | ||
1207 | + <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qjm-11-Clh"> | ||
1208 | + <rect key="frame" x="0.0" y="5" width="414" height="847"/> | ||
1209 | + <subviews> | ||
1210 | + <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9kx-ct-jms"> | ||
1211 | + <rect key="frame" x="0.0" y="0.0" width="414" height="852"/> | ||
1212 | + <subviews> | ||
1213 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="p6Q-Rn-C6F"> | ||
1214 | + <rect key="frame" x="0.0" y="0.0" width="414" height="200"/> | ||
1215 | + <constraints> | ||
1216 | + <constraint firstAttribute="height" constant="200" id="P2E-Lo-wU3"/> | ||
1217 | + </constraints> | ||
1218 | + </imageView> | ||
1219 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Πάρε δωρεάν μηνιαία πακέτα με πάνες στα supermarket Σκλαβενίτης!" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="a9N-Ea-LNm"> | ||
1220 | + <rect key="frame" x="20" y="230" width="374" height="38.5"/> | ||
1221 | + <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/> | ||
1222 | + <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="0.84705882349999995" colorSpace="calibratedRGB"/> | ||
1223 | + <nil key="highlightedColor"/> | ||
1224 | + </label> | ||
1225 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Χρησιμοποίησε τον παρακάτω κωδικό και πάρε δωρεάν πακέτο πάνες Pampers αποκλειστικά στα Supermarket Σκλαβενίτης" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EV0-Fh-Tdo"> | ||
1226 | + <rect key="frame" x="20" y="293.5" width="374" height="57.5"/> | ||
1227 | + <fontDescription key="fontDescription" type="system" pointSize="16"/> | ||
1228 | + <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="0.84705882349999995" colorSpace="calibratedRGB"/> | ||
1229 | + <nil key="highlightedColor"/> | ||
1230 | + </label> | ||
1231 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="flv-Ik-YC2" userLabel="Sender View"> | ||
1232 | + <rect key="frame" x="20" y="401" width="374" height="48"/> | ||
1233 | + <subviews> | ||
1234 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Αποστολέας" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GX7-IF-Gdd"> | ||
1235 | + <rect key="frame" x="10" y="15" width="334" height="18"/> | ||
1236 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/> | ||
1237 | + <color key="textColor" red="0.25490196078431371" green="0.33333333333333331" blue="0.39215686274509803" alpha="1" colorSpace="calibratedRGB"/> | ||
1238 | + <nil key="highlightedColor"/> | ||
1239 | + </label> | ||
1240 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_down_dark" translatesAutoresizingMaskIntoConstraints="NO" id="Ul8-d9-FfM"> | ||
1241 | + <rect key="frame" x="354" y="16.5" width="15" height="15"/> | ||
1242 | + <constraints> | ||
1243 | + <constraint firstAttribute="height" constant="15" id="7Cv-XL-7ld"/> | ||
1244 | + <constraint firstAttribute="width" constant="15" id="bga-Xk-Jqu"/> | ||
1245 | + </constraints> | ||
1246 | + </imageView> | ||
1247 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uwc-Al-475" userLabel="Border View"> | ||
1248 | + <rect key="frame" x="0.0" y="47" width="374" height="1"/> | ||
1249 | + <color key="backgroundColor" red="0.75294117647058822" green="0.7803921568627451" blue="0.80392156862745101" alpha="1" colorSpace="calibratedRGB"/> | ||
1250 | + <constraints> | ||
1251 | + <constraint firstAttribute="height" constant="1" id="AIa-Cf-WAf"/> | ||
1252 | + </constraints> | ||
1253 | + </view> | ||
1254 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YD8-9K-Fp9"> | ||
1255 | + <rect key="frame" x="0.0" y="0.0" width="374" height="48"/> | ||
1256 | + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> | ||
1257 | + </button> | ||
1258 | + </subviews> | ||
1259 | + <color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
1260 | + <constraints> | ||
1261 | + <constraint firstItem="YD8-9K-Fp9" firstAttribute="leading" secondItem="flv-Ik-YC2" secondAttribute="leading" id="9Gw-eu-4zG"/> | ||
1262 | + <constraint firstAttribute="bottom" secondItem="GX7-IF-Gdd" secondAttribute="bottom" constant="15" id="BeI-uZ-EP2"/> | ||
1263 | + <constraint firstItem="uwc-Al-475" firstAttribute="leading" secondItem="flv-Ik-YC2" secondAttribute="leading" id="E1X-0a-tHn"/> | ||
1264 | + <constraint firstItem="Ul8-d9-FfM" firstAttribute="leading" secondItem="GX7-IF-Gdd" secondAttribute="trailing" constant="10" id="EPW-w2-cMy"/> | ||
1265 | + <constraint firstAttribute="trailing" secondItem="uwc-Al-475" secondAttribute="trailing" id="FU0-fB-g1t"/> | ||
1266 | + <constraint firstAttribute="trailing" secondItem="YD8-9K-Fp9" secondAttribute="trailing" id="GqN-Rs-XwE"/> | ||
1267 | + <constraint firstAttribute="bottom" secondItem="YD8-9K-Fp9" secondAttribute="bottom" id="Ht0-rk-2dq"/> | ||
1268 | + <constraint firstAttribute="bottom" secondItem="uwc-Al-475" secondAttribute="bottom" id="PxP-0D-7Pa"/> | ||
1269 | + <constraint firstItem="GX7-IF-Gdd" firstAttribute="top" secondItem="flv-Ik-YC2" secondAttribute="top" constant="15" id="RNt-06-HCU"/> | ||
1270 | + <constraint firstItem="YD8-9K-Fp9" firstAttribute="top" secondItem="flv-Ik-YC2" secondAttribute="top" id="bMV-su-udf"/> | ||
1271 | + <constraint firstItem="GX7-IF-Gdd" firstAttribute="leading" secondItem="flv-Ik-YC2" secondAttribute="leading" constant="10" id="evt-G0-LtE"/> | ||
1272 | + <constraint firstAttribute="trailing" secondItem="Ul8-d9-FfM" secondAttribute="trailing" constant="5" id="lhW-A0-smM"/> | ||
1273 | + <constraint firstItem="Ul8-d9-FfM" firstAttribute="centerY" secondItem="GX7-IF-Gdd" secondAttribute="centerY" id="nAb-6R-0u4"/> | ||
1274 | + </constraints> | ||
1275 | + </view> | ||
1276 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Bsb-ps-GWu"> | ||
1277 | + <rect key="frame" x="83" y="609.5" width="248" height="40"/> | ||
1278 | + <constraints> | ||
1279 | + <constraint firstAttribute="height" constant="40" id="ge6-VF-hRu"/> | ||
1280 | + </constraints> | ||
1281 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/> | ||
1282 | + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> | ||
1283 | + <state key="normal" title="Απόκτησέ το"> | ||
1284 | + <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
1285 | + </state> | ||
1286 | + <connections> | ||
1287 | + <action selector="redeemButtomAction:" destination="hwy-nc-4N0" eventType="touchUpInside" id="fWY-nZ-K6c"/> | ||
1288 | + </connections> | ||
1289 | + </button> | ||
1290 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uf8-tj-KCP" userLabel="Number Input View"> | ||
1291 | + <rect key="frame" x="20" y="489" width="374" height="50.5"/> | ||
1292 | + <subviews> | ||
1293 | + <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Καταχώρηση τηλεφώνου" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="MYX-E6-emS"> | ||
1294 | + <rect key="frame" x="10" y="15" width="354" height="19.5"/> | ||
1295 | + <color key="textColor" red="0.25490196078431371" green="0.33333333333333331" blue="0.39215686274509803" alpha="1" colorSpace="calibratedRGB"/> | ||
1296 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/> | ||
1297 | + <textInputTraits key="textInputTraits"/> | ||
1298 | + </textField> | ||
1299 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZfV-Yt-Nsb" userLabel="Border View"> | ||
1300 | + <rect key="frame" x="0.0" y="49.5" width="374" height="1"/> | ||
1301 | + <color key="backgroundColor" red="0.75294117650000003" green="0.78039215689999997" blue="0.80392156859999997" alpha="1" colorSpace="calibratedRGB"/> | ||
1302 | + <constraints> | ||
1303 | + <constraint firstAttribute="height" constant="1" id="XVw-LC-VSt"/> | ||
1304 | + </constraints> | ||
1305 | + </view> | ||
1306 | + </subviews> | ||
1307 | + <color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
1308 | + <constraints> | ||
1309 | + <constraint firstAttribute="trailing" secondItem="ZfV-Yt-Nsb" secondAttribute="trailing" id="45X-a2-POt"/> | ||
1310 | + <constraint firstItem="ZfV-Yt-Nsb" firstAttribute="leading" secondItem="uf8-tj-KCP" secondAttribute="leading" id="6Wq-tB-09n"/> | ||
1311 | + <constraint firstItem="MYX-E6-emS" firstAttribute="top" secondItem="uf8-tj-KCP" secondAttribute="top" constant="15" id="AaT-uD-wrU"/> | ||
1312 | + <constraint firstAttribute="trailing" secondItem="MYX-E6-emS" secondAttribute="trailing" constant="10" id="QeR-XF-HLV"/> | ||
1313 | + <constraint firstAttribute="bottom" secondItem="ZfV-Yt-Nsb" secondAttribute="bottom" id="XAl-Pb-x0E"/> | ||
1314 | + <constraint firstItem="ZfV-Yt-Nsb" firstAttribute="top" secondItem="MYX-E6-emS" secondAttribute="bottom" constant="15" id="fL9-Zw-IfQ"/> | ||
1315 | + <constraint firstItem="MYX-E6-emS" firstAttribute="leading" secondItem="uf8-tj-KCP" secondAttribute="leading" constant="10" id="ovh-ao-Rrn"/> | ||
1316 | + </constraints> | ||
1317 | + </view> | ||
1318 | + </subviews> | ||
1319 | + <color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
1320 | + <constraints> | ||
1321 | + <constraint firstItem="uf8-tj-KCP" firstAttribute="top" secondItem="flv-Ik-YC2" secondAttribute="bottom" constant="40" id="0ie-rj-RuH"/> | ||
1322 | + <constraint firstItem="a9N-Ea-LNm" firstAttribute="leading" secondItem="9kx-ct-jms" secondAttribute="leading" constant="20" id="Azr-VI-Q1m"/> | ||
1323 | + <constraint firstItem="EV0-Fh-Tdo" firstAttribute="leading" secondItem="9kx-ct-jms" secondAttribute="leading" constant="20" id="CAj-eC-Z9x"/> | ||
1324 | + <constraint firstItem="Bsb-ps-GWu" firstAttribute="top" secondItem="uf8-tj-KCP" secondAttribute="bottom" constant="70" id="Cbu-wk-sAY"/> | ||
1325 | + <constraint firstItem="p6Q-Rn-C6F" firstAttribute="leading" secondItem="9kx-ct-jms" secondAttribute="leading" id="H67-hs-Ijs"/> | ||
1326 | + <constraint firstItem="a9N-Ea-LNm" firstAttribute="top" secondItem="p6Q-Rn-C6F" secondAttribute="bottom" constant="30" id="HsR-wW-gb9"/> | ||
1327 | + <constraint firstItem="Bsb-ps-GWu" firstAttribute="centerX" secondItem="9kx-ct-jms" secondAttribute="centerX" id="IMc-7K-7K5"/> | ||
1328 | + <constraint firstItem="EV0-Fh-Tdo" firstAttribute="top" secondItem="a9N-Ea-LNm" secondAttribute="bottom" constant="25" id="LuN-SP-Ty3"/> | ||
1329 | + <constraint firstItem="uf8-tj-KCP" firstAttribute="leading" secondItem="9kx-ct-jms" secondAttribute="leading" constant="20" id="RnR-gU-5ge"/> | ||
1330 | + <constraint firstItem="flv-Ik-YC2" firstAttribute="leading" secondItem="9kx-ct-jms" secondAttribute="leading" constant="20" id="ahh-fc-oVh"/> | ||
1331 | + <constraint firstItem="flv-Ik-YC2" firstAttribute="top" secondItem="EV0-Fh-Tdo" secondAttribute="bottom" constant="50" id="bzc-9W-WMj"/> | ||
1332 | + <constraint firstItem="Bsb-ps-GWu" firstAttribute="width" secondItem="9kx-ct-jms" secondAttribute="width" multiplier="0.6" id="dVr-48-Bua"/> | ||
1333 | + <constraint firstAttribute="trailing" secondItem="flv-Ik-YC2" secondAttribute="trailing" constant="20" id="lPH-Bs-rcr"/> | ||
1334 | + <constraint firstAttribute="trailing" secondItem="uf8-tj-KCP" secondAttribute="trailing" constant="20" id="ldF-78-GiQ"/> | ||
1335 | + <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="Bsb-ps-GWu" secondAttribute="bottom" constant="30" id="rIj-jg-3HJ"/> | ||
1336 | + <constraint firstAttribute="trailing" secondItem="EV0-Fh-Tdo" secondAttribute="trailing" constant="20" id="vgr-hi-yXG"/> | ||
1337 | + <constraint firstAttribute="trailing" secondItem="a9N-Ea-LNm" secondAttribute="trailing" constant="20" id="w5F-Go-Ngy"/> | ||
1338 | + <constraint firstItem="p6Q-Rn-C6F" firstAttribute="top" secondItem="9kx-ct-jms" secondAttribute="top" id="wKc-Xn-Rpd"/> | ||
1339 | + <constraint firstAttribute="trailing" secondItem="p6Q-Rn-C6F" secondAttribute="trailing" id="x5P-bs-wTV"/> | ||
1340 | + </constraints> | ||
1341 | + </view> | ||
1342 | + </subviews> | ||
1343 | + <constraints> | ||
1344 | + <constraint firstItem="9kx-ct-jms" firstAttribute="trailing" secondItem="fXc-vI-HgW" secondAttribute="trailing" id="8Bd-Z6-1uf"/> | ||
1345 | + <constraint firstItem="9kx-ct-jms" firstAttribute="top" secondItem="fXc-vI-HgW" secondAttribute="top" id="8Y9-mr-Nfn"/> | ||
1346 | + <constraint firstItem="9kx-ct-jms" firstAttribute="bottom" secondItem="fXc-vI-HgW" secondAttribute="bottom" id="CXg-rp-uGE"/> | ||
1347 | + <constraint firstItem="9kx-ct-jms" firstAttribute="leading" secondItem="fXc-vI-HgW" secondAttribute="leading" id="ROI-RH-O62"/> | ||
1348 | + <constraint firstItem="9kx-ct-jms" firstAttribute="width" secondItem="wi0-bn-nU4" secondAttribute="width" id="Rkv-dA-vkc"/> | ||
1349 | + </constraints> | ||
1350 | + <viewLayoutGuide key="contentLayoutGuide" id="fXc-vI-HgW"/> | ||
1351 | + <viewLayoutGuide key="frameLayoutGuide" id="wi0-bn-nU4"/> | ||
1352 | + </scrollView> | ||
1353 | + </subviews> | ||
1354 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
1355 | + <constraints> | ||
1356 | + <constraint firstAttribute="trailing" secondItem="QF0-ih-7ii" secondAttribute="trailing" id="1Dp-wN-6ea"/> | ||
1357 | + <constraint firstItem="qjm-11-Clh" firstAttribute="top" secondItem="y5q-8M-0jB" secondAttribute="top" constant="5" id="KFV-m0-qD9"/> | ||
1358 | + <constraint firstAttribute="trailing" secondItem="qjm-11-Clh" secondAttribute="trailing" id="SLZ-0e-4Gf"/> | ||
1359 | + <constraint firstItem="9kx-ct-jms" firstAttribute="height" relation="greaterThanOrEqual" secondItem="y5q-8M-0jB" secondAttribute="height" id="X7v-Nl-Qah"/> | ||
1360 | + <constraint firstItem="QF0-ih-7ii" firstAttribute="leading" secondItem="y5q-8M-0jB" secondAttribute="leading" id="ioY-Nv-rN8"/> | ||
1361 | + <constraint firstItem="qjm-11-Clh" firstAttribute="leading" secondItem="y5q-8M-0jB" secondAttribute="leading" id="oVa-yv-1v2"/> | ||
1362 | + <constraint firstItem="QF0-ih-7ii" firstAttribute="top" secondItem="y5q-8M-0jB" secondAttribute="top" id="pO7-RQ-VKz"/> | ||
1363 | + <constraint firstAttribute="bottom" secondItem="qjm-11-Clh" secondAttribute="bottom" id="rtH-Ju-JYH"/> | ||
1364 | + <constraint firstAttribute="bottom" secondItem="QF0-ih-7ii" secondAttribute="bottom" id="ry3-Ls-aHe"/> | ||
1365 | + </constraints> | ||
1366 | + </view> | ||
1367 | + </subviews> | ||
1368 | + <viewLayoutGuide key="safeArea" id="ca4-2z-k86"/> | ||
1369 | + <color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
1370 | + <constraints> | ||
1371 | + <constraint firstItem="y5q-8M-0jB" firstAttribute="top" secondItem="ca4-2z-k86" secondAttribute="top" id="3Ep-he-I1K"/> | ||
1372 | + <constraint firstAttribute="trailing" secondItem="y5q-8M-0jB" secondAttribute="trailing" id="9SI-Tg-N40"/> | ||
1373 | + <constraint firstAttribute="bottom" secondItem="y5q-8M-0jB" secondAttribute="bottom" id="F8E-Vg-RBL"/> | ||
1374 | + <constraint firstItem="y5q-8M-0jB" firstAttribute="leading" secondItem="Nlq-Bo-JaK" secondAttribute="leading" id="hAz-9x-GrN"/> | ||
1375 | + </constraints> | ||
1376 | + </view> | ||
1377 | + <connections> | ||
1378 | + <outlet property="backgroundImage" destination="QF0-ih-7ii" id="TU0-eR-kCH"/> | ||
1379 | + <outlet property="couponImage" destination="p6Q-Rn-C6F" id="ssz-3x-G4v"/> | ||
1380 | + <outlet property="couponImageHeight" destination="P2E-Lo-wU3" id="3dt-QC-L8I"/> | ||
1381 | + <outlet property="descriptionLabel" destination="EV0-Fh-Tdo" id="ytE-oL-jzY"/> | ||
1382 | + <outlet property="mainView" destination="y5q-8M-0jB" id="bXx-6t-fFP"/> | ||
1383 | + <outlet property="mainViewBottom" destination="F8E-Vg-RBL" id="MB6-6B-ej7"/> | ||
1384 | + <outlet property="nameLabel" destination="a9N-Ea-LNm" id="Jcn-tN-yv3"/> | ||
1385 | + <outlet property="numberTextField" destination="MYX-E6-emS" id="rdP-lB-gCF"/> | ||
1386 | + <outlet property="redeemButton" destination="Bsb-ps-GWu" id="PcK-Uo-DfZ"/> | ||
1387 | + <outlet property="scrollContentView" destination="9kx-ct-jms" id="R7e-8z-b7h"/> | ||
1388 | + <outlet property="scrollView" destination="qjm-11-Clh" id="FNR-5H-KeK"/> | ||
1389 | + <outlet property="senderArrowImage" destination="Ul8-d9-FfM" id="dol-tk-Wt3"/> | ||
1390 | + <outlet property="senderButton" destination="YD8-9K-Fp9" id="ZxN-6t-1SJ"/> | ||
1391 | + <outlet property="senderLabel" destination="GX7-IF-Gdd" id="U5C-LC-trH"/> | ||
1392 | + </connections> | ||
1393 | + </viewController> | ||
1394 | + <placeholder placeholderIdentifier="IBFirstResponder" id="0nA-Nd-CMT" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> | ||
1395 | + </objects> | ||
1396 | + <point key="canvasLocation" x="3125" y="-555"/> | ||
1397 | + </scene> | ||
1398 | + <!--Number Popup View Controller--> | ||
1399 | + <scene sceneID="4f3-Qv-N77"> | ||
1400 | + <objects> | ||
1401 | + <viewController storyboardIdentifier="NumberPopupViewController" id="86r-jf-E5J" customClass="NumberPopupViewController" customModule="SwiftWarplyFramework" customModuleProvider="target" sceneMemberID="viewController"> | ||
1402 | + <view key="view" contentMode="scaleToFill" id="HDn-3J-ASt"> | ||
1403 | + <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> | ||
1404 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
1405 | + <subviews> | ||
1406 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8Jx-NE-Gpc" userLabel="Main View"> | ||
1407 | + <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> | ||
1408 | + <subviews> | ||
1409 | + <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="F4m-zQ-Zh6"> | ||
1410 | + <rect key="frame" x="0.0" y="255.5" width="414" height="596.5"/> | ||
1411 | + <subviews> | ||
1412 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0xG-Ve-mIx" userLabel="Header View"> | ||
1413 | + <rect key="frame" x="20" y="15" width="374" height="19.5"/> | ||
1414 | + <subviews> | ||
1415 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Αποστολέας" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pFK-Hg-dL8"> | ||
1416 | + <rect key="frame" x="0.0" y="0.0" width="324" height="19.5"/> | ||
1417 | + <fontDescription key="fontDescription" type="system" weight="heavy" pointSize="16"/> | ||
1418 | + <color key="textColor" red="0.25490196078431371" green="0.33333333333333331" blue="0.39215686274509803" alpha="1" colorSpace="calibratedRGB"/> | ||
1419 | + <nil key="highlightedColor"/> | ||
1420 | + </label> | ||
1421 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KPV-ZJ-Q2P"> | ||
1422 | + <rect key="frame" x="344" y="-5" width="30" height="30"/> | ||
1423 | + <constraints> | ||
1424 | + <constraint firstAttribute="width" constant="30" id="D8t-oA-ydZ"/> | ||
1425 | + <constraint firstAttribute="height" constant="30" id="j96-P9-Bf4"/> | ||
1426 | + </constraints> | ||
1427 | + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> | ||
1428 | + <state key="normal" image="ic_close"/> | ||
1429 | + <connections> | ||
1430 | + <action selector="closeButtonAction:" destination="86r-jf-E5J" eventType="touchUpInside" id="sBr-NV-x53"/> | ||
1431 | + </connections> | ||
1432 | + </button> | ||
1433 | + </subviews> | ||
1434 | + <color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
1435 | + <constraints> | ||
1436 | + <constraint firstItem="KPV-ZJ-Q2P" firstAttribute="centerY" secondItem="0xG-Ve-mIx" secondAttribute="centerY" id="P6g-E9-rFy"/> | ||
1437 | + <constraint firstItem="KPV-ZJ-Q2P" firstAttribute="leading" secondItem="pFK-Hg-dL8" secondAttribute="trailing" constant="20" id="bH7-Ku-0JS"/> | ||
1438 | + <constraint firstItem="pFK-Hg-dL8" firstAttribute="top" secondItem="0xG-Ve-mIx" secondAttribute="top" id="cLK-rf-2qg"/> | ||
1439 | + <constraint firstAttribute="bottom" secondItem="pFK-Hg-dL8" secondAttribute="bottom" id="jRq-Hu-0xA"/> | ||
1440 | + <constraint firstItem="pFK-Hg-dL8" firstAttribute="leading" secondItem="0xG-Ve-mIx" secondAttribute="leading" id="kS0-D2-zX2"/> | ||
1441 | + <constraint firstAttribute="trailing" secondItem="KPV-ZJ-Q2P" secondAttribute="trailing" id="tTg-mE-ule"/> | ||
1442 | + </constraints> | ||
1443 | + </view> | ||
1444 | + <tableView clipsSubviews="YES" contentMode="scaleToFill" ambiguous="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="wWu-nN-lGB" customClass="DynamicSizeTableView" customModule="SwiftWarplyFramework" customModuleProvider="target"> | ||
1445 | + <rect key="frame" x="0.0" y="49.5" width="414" height="547"/> | ||
1446 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
1447 | + <color key="separatorColor" red="0.68235294117647061" green="0.68235294117647061" blue="0.68235294117647061" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> | ||
1448 | + <inset key="separatorInset" minX="10" minY="0.0" maxX="10" maxY="0.0"/> | ||
1449 | + <color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
1450 | + <prototypes> | ||
1451 | + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="NumbersTableViewCellId" id="bGq-NG-TaP" customClass="NumbersTableViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> | ||
1452 | + <rect key="frame" x="0.0" y="44.5" width="414" height="44"/> | ||
1453 | + <autoresizingMask key="autoresizingMask"/> | ||
1454 | + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="bGq-NG-TaP" id="08f-2t-mOi"> | ||
1455 | + <rect key="frame" x="0.0" y="0.0" width="414" height="44"/> | ||
1456 | + <autoresizingMask key="autoresizingMask"/> | ||
1457 | + <subviews> | ||
1458 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6Z8-zA-Ilx"> | ||
1459 | + <rect key="frame" x="10" y="0.0" width="394" height="44"/> | ||
1460 | + <subviews> | ||
1461 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eHE-4G-yAU"> | ||
1462 | + <rect key="frame" x="10" y="13" width="374" height="18"/> | ||
1463 | + <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="15"/> | ||
1464 | + <color key="textColor" red="0.25490196078431371" green="0.33333333333333331" blue="0.39215686274509803" alpha="1" colorSpace="calibratedRGB"/> | ||
1465 | + <nil key="highlightedColor"/> | ||
1466 | + </label> | ||
1467 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IlA-Ak-aqA" userLabel="Border View"> | ||
1468 | + <rect key="frame" x="0.0" y="43" width="394" height="1"/> | ||
1469 | + <color key="backgroundColor" red="0.68235294117647061" green="0.68235294117647061" blue="0.68235294117647061" alpha="1" colorSpace="calibratedRGB"/> | ||
1470 | + <constraints> | ||
1471 | + <constraint firstAttribute="height" constant="1" id="rSl-h2-6op"/> | ||
1472 | + </constraints> | ||
1473 | + </view> | ||
1474 | + </subviews> | ||
1475 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
1476 | + <constraints> | ||
1477 | + <constraint firstItem="eHE-4G-yAU" firstAttribute="leading" secondItem="6Z8-zA-Ilx" secondAttribute="leading" constant="10" id="05O-Qy-VKw"/> | ||
1478 | + <constraint firstAttribute="trailing" secondItem="eHE-4G-yAU" secondAttribute="trailing" constant="10" id="0bT-Be-Abd"/> | ||
1479 | + <constraint firstItem="IlA-Ak-aqA" firstAttribute="leading" secondItem="6Z8-zA-Ilx" secondAttribute="leading" id="5iQ-M7-Pmi"/> | ||
1480 | + <constraint firstItem="eHE-4G-yAU" firstAttribute="centerY" secondItem="6Z8-zA-Ilx" secondAttribute="centerY" id="7n2-QE-6LB"/> | ||
1481 | + <constraint firstAttribute="trailing" secondItem="IlA-Ak-aqA" secondAttribute="trailing" id="QAJ-2x-FK5"/> | ||
1482 | + <constraint firstAttribute="bottom" secondItem="IlA-Ak-aqA" secondAttribute="bottom" id="tyv-10-bOi"/> | ||
1483 | + </constraints> | ||
1484 | + </view> | ||
1485 | + </subviews> | ||
1486 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
1487 | + <constraints> | ||
1488 | + <constraint firstItem="6Z8-zA-Ilx" firstAttribute="top" secondItem="08f-2t-mOi" secondAttribute="top" id="5hE-1W-gRl"/> | ||
1489 | + <constraint firstAttribute="bottom" secondItem="6Z8-zA-Ilx" secondAttribute="bottom" id="KMc-ya-Gaq"/> | ||
1490 | + <constraint firstItem="6Z8-zA-Ilx" firstAttribute="leading" secondItem="08f-2t-mOi" secondAttribute="leading" constant="10" id="SQ8-Ec-lat"/> | ||
1491 | + <constraint firstAttribute="trailing" secondItem="6Z8-zA-Ilx" secondAttribute="trailing" constant="10" id="zFo-Fy-vhe"/> | ||
1492 | + </constraints> | ||
1493 | + </tableViewCellContentView> | ||
1494 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
1495 | + <connections> | ||
1496 | + <outlet property="borderView" destination="IlA-Ak-aqA" id="KBo-Aw-eL0"/> | ||
1497 | + <outlet property="numberLabel" destination="eHE-4G-yAU" id="NgW-rh-H4I"/> | ||
1498 | + </connections> | ||
1499 | + </tableViewCell> | ||
1500 | + </prototypes> | ||
1501 | + <connections> | ||
1502 | + <outlet property="dataSource" destination="86r-jf-E5J" id="Fen-0z-hr8"/> | ||
1503 | + <outlet property="delegate" destination="86r-jf-E5J" id="Vl4-vH-1TN"/> | ||
1504 | + </connections> | ||
1505 | + </tableView> | ||
1506 | + </subviews> | ||
1507 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
1508 | + <constraints> | ||
1509 | + <constraint firstAttribute="bottom" secondItem="wWu-nN-lGB" secondAttribute="bottom" constant="30" id="HQU-rY-rMH"/> | ||
1510 | + <constraint firstItem="wWu-nN-lGB" firstAttribute="leading" secondItem="F4m-zQ-Zh6" secondAttribute="leading" id="LbR-zf-qNh"/> | ||
1511 | + <constraint firstAttribute="trailing" secondItem="0xG-Ve-mIx" secondAttribute="trailing" constant="20" id="RDX-Zk-Nof"/> | ||
1512 | + <constraint firstAttribute="trailing" secondItem="wWu-nN-lGB" secondAttribute="trailing" id="Sts-YR-8kY"/> | ||
1513 | + <constraint firstItem="0xG-Ve-mIx" firstAttribute="leading" secondItem="F4m-zQ-Zh6" secondAttribute="leading" constant="20" id="T22-wc-vEO"/> | ||
1514 | + <constraint firstItem="0xG-Ve-mIx" firstAttribute="top" secondItem="F4m-zQ-Zh6" secondAttribute="top" constant="15" id="dDT-Qg-4jf"/> | ||
1515 | + <constraint firstItem="wWu-nN-lGB" firstAttribute="top" secondItem="0xG-Ve-mIx" secondAttribute="bottom" constant="15" id="hJm-Bn-Mtw"/> | ||
1516 | + </constraints> | ||
1517 | + </view> | ||
1518 | + </subviews> | ||
1519 | + <color key="backgroundColor" red="0.2196078431372549" green="0.32156862745098036" blue="0.40392156862745099" alpha="0.57999999999999996" colorSpace="calibratedRGB"/> | ||
1520 | + <constraints> | ||
1521 | + <constraint firstAttribute="bottom" secondItem="F4m-zQ-Zh6" secondAttribute="bottom" id="0IG-5A-Zmi"/> | ||
1522 | + <constraint firstAttribute="trailing" secondItem="F4m-zQ-Zh6" secondAttribute="trailing" id="eer-CU-UZe"/> | ||
1523 | + <constraint firstItem="F4m-zQ-Zh6" firstAttribute="leading" secondItem="8Jx-NE-Gpc" secondAttribute="leading" id="kqx-eL-5ee"/> | ||
1524 | + <constraint firstItem="F4m-zQ-Zh6" firstAttribute="height" relation="lessThanOrEqual" secondItem="8Jx-NE-Gpc" secondAttribute="height" multiplier="0.7" id="u1s-Fn-9ey"/> | ||
1525 | + </constraints> | ||
1526 | + </view> | ||
1527 | + </subviews> | ||
1528 | + <viewLayoutGuide key="safeArea" id="EYC-Ne-yWd"/> | ||
1529 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
1530 | + <constraints> | ||
1531 | + <constraint firstItem="8Jx-NE-Gpc" firstAttribute="top" secondItem="HDn-3J-ASt" secondAttribute="top" id="WQC-0P-Ddg"/> | ||
1532 | + <constraint firstAttribute="bottom" secondItem="8Jx-NE-Gpc" secondAttribute="bottom" id="Ypa-HF-Q4d"/> | ||
1533 | + <constraint firstAttribute="trailing" secondItem="8Jx-NE-Gpc" secondAttribute="trailing" id="ca9-Ne-RbJ"/> | ||
1534 | + <constraint firstItem="8Jx-NE-Gpc" firstAttribute="leading" secondItem="HDn-3J-ASt" secondAttribute="leading" id="j92-Cc-5Ey"/> | ||
1535 | + </constraints> | ||
1536 | + </view> | ||
1537 | + <connections> | ||
1538 | + <outlet property="closeButton" destination="KPV-ZJ-Q2P" id="oTp-fO-9bh"/> | ||
1539 | + <outlet property="headerLabel" destination="pFK-Hg-dL8" id="D2P-aU-UBx"/> | ||
1540 | + <outlet property="popupView" destination="F4m-zQ-Zh6" id="nu6-T7-eEv"/> | ||
1541 | + <outlet property="tableView" destination="wWu-nN-lGB" id="Q2o-6b-qzD"/> | ||
1542 | + </connections> | ||
1543 | + </viewController> | ||
1544 | + <placeholder placeholderIdentifier="IBFirstResponder" id="KVs-gk-qeE" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> | ||
1545 | + </objects> | ||
1546 | + <point key="canvasLocation" x="3903" y="-555"/> | ||
1547 | + </scene> | ||
1193 | <!--Coupon View Controller--> | 1548 | <!--Coupon View Controller--> |
1194 | <scene sceneID="yGm-Im-aAN"> | 1549 | <scene sceneID="yGm-Im-aAN"> |
1195 | <objects> | 1550 | <objects> |
... | @@ -1399,6 +1754,7 @@ | ... | @@ -1399,6 +1754,7 @@ |
1399 | <image name="curved_bg_white" width="159.5" height="118.5"/> | 1754 | <image name="curved_bg_white" width="159.5" height="118.5"/> |
1400 | <image name="dfy_logo_white" width="1611" height="395"/> | 1755 | <image name="dfy_logo_white" width="1611" height="395"/> |
1401 | <image name="ic_background_circle" width="214" height="134"/> | 1756 | <image name="ic_background_circle" width="214" height="134"/> |
1757 | + <image name="ic_close" width="17" height="17.5"/> | ||
1402 | <image name="ic_down_dark" width="22" height="11.5"/> | 1758 | <image name="ic_down_dark" width="22" height="11.5"/> |
1403 | <image name="new_icon" width="37" height="17"/> | 1759 | <image name="new_icon" width="37" height="17"/> |
1404 | <image name="wallet_coupons" width="63" height="73"/> | 1760 | <image name="wallet_coupons" width="63" height="73"/> | ... | ... |
1 | +{ | ||
2 | + "images" : [ | ||
3 | + { | ||
4 | + "filename" : "ic_close.png", | ||
5 | + "idiom" : "universal", | ||
6 | + "scale" : "1x" | ||
7 | + }, | ||
8 | + { | ||
9 | + "filename" : "ic_close-1.png", | ||
10 | + "idiom" : "universal", | ||
11 | + "scale" : "2x" | ||
12 | + }, | ||
13 | + { | ||
14 | + "filename" : "ic_close-2.png", | ||
15 | + "idiom" : "universal", | ||
16 | + "scale" : "3x" | ||
17 | + } | ||
18 | + ], | ||
19 | + "info" : { | ||
20 | + "author" : "xcode", | ||
21 | + "version" : 1 | ||
22 | + } | ||
23 | +} |
SwiftWarplyFramework/SwiftWarplyFramework/Media.xcassets/ic_close.imageset/ic_close-1.png
0 → 100644
1.01 KB
SwiftWarplyFramework/SwiftWarplyFramework/Media.xcassets/ic_close.imageset/ic_close-2.png
0 → 100644
1.01 KB
1.01 KB
... | @@ -87,6 +87,7 @@ | ... | @@ -87,6 +87,7 @@ |
87 | - (void)cosmoteSharingAsync:(NSString*)sharingId :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; | 87 | - (void)cosmoteSharingAsync:(NSString*)sharingId :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; |
88 | - (void)cosmoteRetrieveSharingAsync:(NSString*)sharingId :(NSNumber*)accept :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; | 88 | - (void)cosmoteRetrieveSharingAsync:(NSString*)sharingId :(NSNumber*)accept :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; |
89 | - (void)getCosmoteUserAsync:(NSString*)guid :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; | 89 | - (void)getCosmoteUserAsync:(NSString*)guid :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; |
90 | +- (void)cosmoteCouponSharingAsync:(NSString*) coupon :(NSString*)sender :(NSString*)receiver :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; | ||
90 | 91 | ||
91 | @end | 92 | @end |
92 | #endif /* MyApi_h */ | 93 | #endif /* MyApi_h */ | ... | ... |
... | @@ -1431,4 +1431,17 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify"; | ... | @@ -1431,4 +1431,17 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify"; |
1431 | }]; | 1431 | }]; |
1432 | } | 1432 | } |
1433 | 1433 | ||
1434 | +- (void)cosmoteCouponSharingAsync:(NSString*) coupon :(NSString*)sender :(NSString*)receiver :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure | ||
1435 | +{ | ||
1436 | + [[Warply sharedService] cosmoteCouponSharingWithSuccessBlock:coupon :sender :receiver :^(NSDictionary *response) { | ||
1437 | + if (success) { | ||
1438 | + success(response); | ||
1439 | + } | ||
1440 | + } failureBlock:^(NSError *error) { | ||
1441 | + if (failure) { | ||
1442 | + failure(error); | ||
1443 | + } | ||
1444 | + }]; | ||
1445 | +} | ||
1446 | + | ||
1434 | @end | 1447 | @end | ... | ... |
1 | +// | ||
2 | +// NumberPopupViewController.swift | ||
3 | +// SwiftWarplyFramework | ||
4 | +// | ||
5 | +// Created by Manos Chorianopoulos on 15/7/22. | ||
6 | +// | ||
7 | + | ||
8 | +import UIKit | ||
9 | + | ||
10 | +protocol NumbersPopupDelegate { | ||
11 | + func numbersPopupTapped(_ sender: Any) | ||
12 | + func presentedPopup() | ||
13 | + func dismissedPopup() | ||
14 | + func optionSelected(_ option: String) | ||
15 | +} | ||
16 | + | ||
17 | + | ||
18 | +@objc public class NumberPopupViewController: UIViewController, UIPopoverPresentationControllerDelegate { | ||
19 | + @IBOutlet weak var popupView: UIView! | ||
20 | + @IBOutlet weak var headerLabel: UILabel! | ||
21 | + @IBOutlet weak var closeButton: UIButton! | ||
22 | + @IBOutlet weak var tableView: UITableView! | ||
23 | + | ||
24 | + let uiscreen: CGRect = UIScreen.main.bounds | ||
25 | + | ||
26 | + var delegateBallon: NumbersPopupDelegate? | ||
27 | + var numbersList: Array<String> = [] | ||
28 | + | ||
29 | + var widthPopup: Int = 0 | ||
30 | + var heightPopup: Int = 0 | ||
31 | + | ||
32 | + func InitWithController(controller: UIViewController, numbersList: Array<String>, sender: Any, delegate: NumbersPopupDelegate){ | ||
33 | + | ||
34 | + //print("Ok InitWithController sender ") | ||
35 | + | ||
36 | + delegateBallon = delegate | ||
37 | + | ||
38 | + // set the presentation style | ||
39 | + self.modalPresentationStyle = UIModalPresentationStyle.popover | ||
40 | + | ||
41 | + // set up the popover presentation controller | ||
42 | +// self.popoverPresentationController?.permittedArrowDirections = UIPopoverArrowDirection.up | ||
43 | + self.popoverPresentationController?.delegate = self | ||
44 | + self.popoverPresentationController?.sourceView = (sender as! UIView ) // button | ||
45 | + //--- Better center of the arrow | ||
46 | +// let rect: CGRect = (sender as AnyObject).bounds | ||
47 | +// let rectFixed: CGRect = CGRect(x: rect.origin.x, y: rect.origin.y, width: rect.size.width-10, height: rect.size.height) | ||
48 | +// self.popoverPresentationController?.sourceRect = rectFixed | ||
49 | + self.popoverPresentationController?.backgroundColor = UIColor.clear | ||
50 | +// self.popoverPresentationController?.backgroundColor = UIColor(red: 0.22, green: 0.32, blue: 0.40, alpha: 0.58) | ||
51 | + | ||
52 | + DispatchQueue.main.async { | ||
53 | + // present the popover | ||
54 | + controller.present(self, animated: true, completion: nil) | ||
55 | + } | ||
56 | + self.numbersList = numbersList | ||
57 | + } | ||
58 | + | ||
59 | + public override func viewWillAppear(_ animated: Bool) { | ||
60 | +// self.SetInfoText(t: infoText ?? "") | ||
61 | + } | ||
62 | + | ||
63 | + public override func viewDidLoad() { | ||
64 | + super.viewDidLoad() | ||
65 | + // Do any additional setup after loading the view, typically from a nib. | ||
66 | +// setupScreens() | ||
67 | + | ||
68 | + tableView.delegate = self | ||
69 | + tableView.dataSource = self | ||
70 | + | ||
71 | + popupView.clipsToBounds = true | ||
72 | + popupView.layer.cornerRadius = 12 | ||
73 | + popupView.layer.maskedCorners = [ .layerMinXMinYCorner, .layerMaxXMinYCorner] // Top left, right corner radius | ||
74 | + | ||
75 | + self.preferredContentSize = CGSize(width: widthPopup, height: heightPopup) | ||
76 | + | ||
77 | + closeButton.setImage(UIImage(named: "ic_close.png", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil), for: .normal) | ||
78 | + closeButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) | ||
79 | + | ||
80 | +// self.tableView.reloadData() | ||
81 | + self.tableView.invalidateIntrinsicContentSize() | ||
82 | + } | ||
83 | + | ||
84 | + func setupScreens() { | ||
85 | +// if UIDevice.current.userInterfaceIdiom == .pad { | ||
86 | +// // Do what you want | ||
87 | +// widthPopup = 450 | ||
88 | +// heightPopup = 550 | ||
89 | +// textView.font = UIFont(name: Fonts.ProximaNova.semibold, size: 20) | ||
90 | +// } else if UIDevice.current.userInterfaceIdiom == .phone { | ||
91 | +// // Do what you want | ||
92 | +// widthPopup = 250 | ||
93 | +// heightPopup = 360 | ||
94 | +// textView.font = UIFont(name: Fonts.ProximaNova.semibold, size: 14) | ||
95 | +// } | ||
96 | + } | ||
97 | + | ||
98 | + public override func viewDidAppear(_ animated: Bool) { | ||
99 | + delegateBallon?.presentedPopup() | ||
100 | + } | ||
101 | + | ||
102 | + public override func viewDidDisappear(_ animated: Bool) { | ||
103 | + delegateBallon?.dismissedPopup() | ||
104 | + } | ||
105 | + | ||
106 | +// func SetInfoText(t: String){ | ||
107 | +// infoTextView.text = t | ||
108 | +// infoTextView.scrollRangeToVisible(NSRange(location:0, length:0)) | ||
109 | +// } | ||
110 | + | ||
111 | + public override func didReceiveMemoryWarning() { | ||
112 | + super.didReceiveMemoryWarning() | ||
113 | + // Dispose of any resources that can be recreated. | ||
114 | + } | ||
115 | + | ||
116 | + public override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | ||
117 | + //print("In prepare") | ||
118 | + } | ||
119 | + | ||
120 | + public func adaptivePresentationStyle(for controller: UIPresentationController) -> UIModalPresentationStyle { | ||
121 | + return UIModalPresentationStyle.fullScreen | ||
122 | + } | ||
123 | + | ||
124 | + public func adaptivePresentationStyle(for controller: UIPresentationController, traitCollection: UITraitCollection) -> UIModalPresentationStyle { | ||
125 | + return UIModalPresentationStyle.fullScreen | ||
126 | +// return UIModalPresentationStyle.none | ||
127 | + } | ||
128 | + | ||
129 | + // MARK: - UIButton Action | ||
130 | + @IBAction func closeButtonAction(_ sender: Any) { | ||
131 | + self.dismiss(animated: true, completion: { | ||
132 | + | ||
133 | + }) | ||
134 | + } | ||
135 | + | ||
136 | +} | ||
137 | + | ||
138 | +// MARK: - TableView | ||
139 | +extension NumberPopupViewController: UITableViewDelegate, UITableViewDataSource{ | ||
140 | + | ||
141 | + public func numberOfSections(in tableView: UITableView) -> Int { | ||
142 | + return 1 | ||
143 | + } | ||
144 | + | ||
145 | + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
146 | + return self.numbersList.count | ||
147 | + } | ||
148 | + | ||
149 | + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | ||
150 | + return 50 //+ 30.0 | ||
151 | +// return UITableViewAutomaticDimension | ||
152 | + } | ||
153 | + | ||
154 | + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
155 | + let cell = tableView.dequeueReusableCell(withIdentifier: "NumbersTableViewCellId", for: indexPath) as! NumbersTableViewCell | ||
156 | + let isLast = indexPath.row == (self.numbersList.count - 1) | ||
157 | + | ||
158 | + cell.configureCell(number: numbersList[indexPath.row], isLast: isLast) | ||
159 | + | ||
160 | + return cell | ||
161 | + } | ||
162 | + | ||
163 | + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ||
164 | + delegateBallon?.optionSelected(self.numbersList[indexPath.row]) | ||
165 | + self.dismiss(animated: true, completion: {}) | ||
166 | + | ||
167 | + // Logs | ||
168 | +// let couponSetData: swiftApi.CouponSetItemModel? = coupons[indexPath.row].couponset_data | ||
169 | +// print("Coupon clicked: " + (coupons[indexPath.row].coupon ?? "")) | ||
170 | +// print("Coupon Name clicked: " + (couponSetData?.name ?? "")) | ||
171 | +// print("Coupon Description clicked: " + (couponSetData?.short_description ?? "")) | ||
172 | +// print("Coupon Expiration clicked: " + (coupons[indexPath.row].expiration ?? "")) | ||
173 | +// | ||
174 | +// let storyboard = UIStoryboard(name: "Main", bundle: nil) | ||
175 | +// let vc = storyboard.instantiateViewController(withIdentifier: "CouponBarcodeViewController") as! CouponBarcodeViewController | ||
176 | +// vc.coupon = coupons[indexPath.row] | ||
177 | +// self.navigationController?.pushViewController(vc, animated: true) | ||
178 | + | ||
179 | + } | ||
180 | + | ||
181 | +} | ||
182 | + | ||
183 | +// Class for dynamic height table view | ||
184 | +@objc public class DynamicSizeTableView: UITableView | ||
185 | +{ | ||
186 | + override public func layoutSubviews() { | ||
187 | + super.layoutSubviews() | ||
188 | + if bounds.size != intrinsicContentSize { | ||
189 | + invalidateIntrinsicContentSize() | ||
190 | + } | ||
191 | + } | ||
192 | + | ||
193 | + override public var intrinsicContentSize: CGSize { | ||
194 | + return contentSize | ||
195 | + } | ||
196 | +} | ||
197 | + |
1 | +// | ||
2 | +// NumbersTableViewCell.swift | ||
3 | +// SwiftWarplyFramework | ||
4 | +// | ||
5 | +// Created by Manos Chorianopoulos on 15/7/22. | ||
6 | +// | ||
7 | + | ||
8 | +import UIKit | ||
9 | + | ||
10 | +@objc public class NumbersTableViewCell: UITableViewCell { | ||
11 | + @IBOutlet weak var numberLabel: UILabel! | ||
12 | + @IBOutlet weak var borderView: UIView! | ||
13 | + | ||
14 | + public override func awakeFromNib() { | ||
15 | + super.awakeFromNib() | ||
16 | + // Initialization code | ||
17 | + } | ||
18 | + | ||
19 | + public override func setSelected(_ selected: Bool, animated: Bool) { | ||
20 | + super.setSelected(selected, animated: animated) | ||
21 | + | ||
22 | + // Configure the view for the selected state | ||
23 | + } | ||
24 | + | ||
25 | + | ||
26 | +// override func layoutSubviews() { | ||
27 | +// super.layoutSubviews() | ||
28 | +// | ||
29 | +// //set the values for top,left,bottom,right margins | ||
30 | +// let margins = UIEdgeInsets(top: 0, left: 0, bottom: 30, right: 0) | ||
31 | +// contentView.frame = contentView.frame.inset(by: margins) | ||
32 | +// } | ||
33 | + | ||
34 | + | ||
35 | + func configureCell(number: String, isLast: Bool) { | ||
36 | + numberLabel.text = number | ||
37 | + if (isLast) { | ||
38 | + borderView.isHidden = true | ||
39 | + } else { | ||
40 | + borderView.isHidden = false | ||
41 | + } | ||
42 | + } | ||
43 | + | ||
44 | +} |
1 | +// | ||
2 | +// ShareViewController.swift | ||
3 | +// SwiftWarplyFramework | ||
4 | +// | ||
5 | +// Created by Manos Chorianopoulos on 15/7/22. | ||
6 | +// | ||
7 | + | ||
8 | +import UIKit | ||
9 | + | ||
10 | +@objc public class ShareViewController: UIViewController, UITextFieldDelegate, UIPopoverControllerDelegate { | ||
11 | + @IBOutlet weak var mainView: UIView! | ||
12 | + @IBOutlet weak var mainViewBottom: NSLayoutConstraint! | ||
13 | + @IBOutlet weak var backgroundImage: UIImageView! | ||
14 | + @IBOutlet weak var scrollView: UIScrollView! | ||
15 | + @IBOutlet weak var scrollContentView: UIView! | ||
16 | + @IBOutlet weak var couponImage: UIImageView! | ||
17 | + @IBOutlet weak var couponImageHeight: NSLayoutConstraint! | ||
18 | + @IBOutlet weak var nameLabel: UILabel! | ||
19 | + @IBOutlet weak var descriptionLabel: UILabel! | ||
20 | + @IBOutlet weak var senderLabel: UILabel! | ||
21 | + @IBOutlet weak var senderArrowImage: UIImageView! | ||
22 | + @IBOutlet weak var senderButton: UIButton! | ||
23 | + @IBOutlet weak var numberTextField: UITextField! | ||
24 | + @IBOutlet weak var redeemButton: UIButton! | ||
25 | + | ||
26 | + let uiscreen: CGRect = UIScreen.main.bounds | ||
27 | + | ||
28 | + public var coupon: swiftApi.CouponItemModel? | ||
29 | + var selectedNumber: String = "" | ||
30 | + var numbersList: Array<String> = [] | ||
31 | + | ||
32 | + public override func viewDidLoad() { | ||
33 | + super.viewDidLoad() | ||
34 | + | ||
35 | + self.hidesBottomBarWhenPushed = true | ||
36 | + | ||
37 | + NotificationCenter.default.addObserver(self, | ||
38 | + selector: #selector(self.keyboardNotification(notification:)), | ||
39 | + name: UIResponder.keyboardWillChangeFrameNotification, | ||
40 | + object: nil) | ||
41 | + | ||
42 | + self.setupToHideKeyboardOnTapOnView() | ||
43 | + numberTextField.delegate = self | ||
44 | + | ||
45 | + getProfileRequest() | ||
46 | + | ||
47 | + // Do any additional setup after loading the view. | ||
48 | + setBackButton() | ||
49 | + setNavigationTitle("Κάντο δώρο!") | ||
50 | + | ||
51 | + backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | ||
52 | + | ||
53 | + scrollView.clipsToBounds = true | ||
54 | + scrollView.layer.cornerRadius = 30 | ||
55 | + scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | ||
56 | + | ||
57 | + // COUPONSET: desc, img_preview, name, terms | ||
58 | + // COUPON: coupon, expiration, discount, status | ||
59 | + | ||
60 | + let couponSetData: swiftApi.CouponSetItemModel? = coupon?.couponset_data | ||
61 | + | ||
62 | + couponImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache()) | ||
63 | + couponImage.contentMode = .scaleAspectFill | ||
64 | + couponImageHeight.constant = self.uiscreen.height * 0.25 | ||
65 | + | ||
66 | + nameLabel.text = couponSetData?.name ?? "" | ||
67 | + descriptionLabel.text = couponSetData?.short_description ?? "" | ||
68 | + | ||
69 | + senderLabel.text = "Αποστολέας" | ||
70 | + senderArrowImage.image = UIImage(named: "ic_down_dark", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | ||
71 | + | ||
72 | + senderButton.addTarget(self, action: #selector(self.numbersPopupTapped(_:)), for: .touchUpInside) | ||
73 | + | ||
74 | + numberTextField.font = UIFont.systemFont(ofSize: 15, weight: UIFont.Weight.medium) | ||
75 | + numberTextField.textColor = UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00) | ||
76 | + numberTextField.attributedPlaceholder = NSAttributedString(string: "Καταχώρηση τηλεφώνου", attributes: [NSAttributedString.Key.foregroundColor: UIColor(red: 0.68, green: 0.68, blue: 0.68, alpha: 1.00)]) | ||
77 | + numberTextField.keyboardType = .asciiCapableNumberPad | ||
78 | + | ||
79 | + redeemButton.titleLabel?.font = UIFont.systemFont(ofSize: 15, weight: .semibold) | ||
80 | + redeemButton.setTitle("Αποστολή με SMS", for: .normal) | ||
81 | + redeemButton.setTitleColor(.white, for: .normal) | ||
82 | + redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00) | ||
83 | + redeemButton.layer.cornerRadius = 12.0 | ||
84 | + | ||
85 | + } | ||
86 | + | ||
87 | + deinit { | ||
88 | + NotificationCenter.default.removeObserver(self) | ||
89 | + } | ||
90 | + | ||
91 | + @objc func keyboardNotification(notification: NSNotification) { | ||
92 | + guard let userInfo = notification.userInfo else { return } | ||
93 | + | ||
94 | + let endFrame = (userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue | ||
95 | + let endFrameY = endFrame?.origin.y ?? 0 | ||
96 | + let duration:TimeInterval = (userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? NSNumber)?.doubleValue ?? 0 | ||
97 | + let animationCurveRawNSN = userInfo[UIResponder.keyboardAnimationCurveUserInfoKey] as? NSNumber | ||
98 | + let animationCurveRaw = animationCurveRawNSN?.uintValue ?? UIView.AnimationOptions.curveEaseInOut.rawValue | ||
99 | + let animationCurve:UIView.AnimationOptions = UIView.AnimationOptions(rawValue: animationCurveRaw) | ||
100 | + | ||
101 | + if endFrameY >= UIScreen.main.bounds.size.height { | ||
102 | + self.mainViewBottom?.constant = 0.0 | ||
103 | + } else { | ||
104 | + self.mainViewBottom?.constant = endFrame?.size.height ?? 0.0 | ||
105 | + } | ||
106 | + | ||
107 | + UIView.animate( | ||
108 | + withDuration: duration, | ||
109 | + delay: TimeInterval(0), | ||
110 | + options: animationCurve, | ||
111 | + animations: { self.view.layoutIfNeeded() }, | ||
112 | + completion: nil) | ||
113 | + } | ||
114 | + | ||
115 | + // MARK: - Functions | ||
116 | + func showSendDialog() -> Void { | ||
117 | + | ||
118 | + let alert = UIAlertController(title: "Στείλε δώρο", message: "Είσαι σίγουρος ότι θέλεις να κάνεις δώρο το κουπόνι σου;", preferredStyle: .alert) | ||
119 | + alert.addAction(UIAlertAction(title: "Αποστολή", style: .default, handler: { action in | ||
120 | + switch action.style{ | ||
121 | + case .default: | ||
122 | + self.cosmoteCouponSharingRequest() | ||
123 | + | ||
124 | + case .cancel: | ||
125 | + print("cancel") | ||
126 | + | ||
127 | + case .destructive: | ||
128 | + print("destructive") | ||
129 | + | ||
130 | + } | ||
131 | + })) | ||
132 | + alert.addAction(UIAlertAction(title: "Άκυρο", style: .default, handler: { action in | ||
133 | + switch action.style{ | ||
134 | + case .default: | ||
135 | + print("default") | ||
136 | + | ||
137 | + case .cancel: | ||
138 | + print("cancel") | ||
139 | + | ||
140 | + case .destructive: | ||
141 | + print("destructive") | ||
142 | + | ||
143 | + } | ||
144 | + })) | ||
145 | + self.present(alert, animated: true, completion: nil) | ||
146 | + } | ||
147 | + | ||
148 | + func showDialog(_ alertTitle: String, _ alertSubTitle: String) -> Void { | ||
149 | + | ||
150 | + let alert = UIAlertController(title: alertTitle, message: alertSubTitle, preferredStyle: .alert) | ||
151 | + alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in | ||
152 | + switch action.style{ | ||
153 | + case .default: | ||
154 | + print("default") | ||
155 | + | ||
156 | + case .cancel: | ||
157 | + print("cancel") | ||
158 | + | ||
159 | + case .destructive: | ||
160 | + print("destructive") | ||
161 | + | ||
162 | + } | ||
163 | + })) | ||
164 | + self.present(alert, animated: true, completion: nil) | ||
165 | + } | ||
166 | + | ||
167 | + // MARK: - API Calls | ||
168 | + func getProfileRequest() { | ||
169 | + swiftApi().getProfileAsync(getProfileCallback) | ||
170 | + } | ||
171 | + | ||
172 | + func getProfileCallback (_ profileData: swiftApi.ProfileModel?) -> Void { | ||
173 | + if (profileData != nil) { | ||
174 | + DispatchQueue.main.async { | ||
175 | + self.numbersList = profileData?.msisdnList ?? [] | ||
176 | + | ||
177 | + print("========= getProfileRequest SUCCESSSS =========") | ||
178 | + } | ||
179 | + } else { | ||
180 | + print("========= getProfileRequest ERROR =========") | ||
181 | + } | ||
182 | + } | ||
183 | + | ||
184 | + func cosmoteCouponSharingRequest() { | ||
185 | + swiftApi().cosmoteCouponSharingAsync(coupon: coupon?.coupon ?? "", sender: selectedNumber, receiver: numberTextField.text ?? "", couponSharingCallback) | ||
186 | + } | ||
187 | + | ||
188 | + func couponSharingCallback (_ response: swiftApi.GenericResponseModel?) -> Void { | ||
189 | + if (response != nil) { | ||
190 | + DispatchQueue.main.async { | ||
191 | + if (response?.getStatus == 1) { | ||
192 | + self.showDialog("Συγχαρητήρια!","Μόλις έκανες δώρο ένα κουπόνι!") | ||
193 | + | ||
194 | +// swiftApi().getCouponsAsync(getCouponsCallback) | ||
195 | +// | ||
196 | +// func getCouponsCallback (_ couponsData: Array<swiftApi.CouponItemModel>?) -> Void { | ||
197 | +// if (couponsData != nil) { | ||
198 | +// | ||
199 | +// DispatchQueue.main.async { | ||
200 | +// print("========= getCouponsRequest SUCCESSSS CouponViewController =========") | ||
201 | +// } | ||
202 | +// } else { | ||
203 | +// print("========= getCouponsRequest ERROR CouponViewController =========") | ||
204 | +// } | ||
205 | +// } | ||
206 | + } else { | ||
207 | + self.showDialog("Αποτυχία","Κάτι πήγε στραβά") | ||
208 | + } | ||
209 | + } | ||
210 | + } else { | ||
211 | + self.showDialog("Αποτυχία","Κάτι πήγε στραβά") | ||
212 | + } | ||
213 | + } | ||
214 | + | ||
215 | + // MARK: - Actions | ||
216 | + @IBAction func redeemButtomAction(_ sender: Any) { | ||
217 | + if (selectedNumber == "" || numberTextField.text == "") { | ||
218 | + self.showDialog("Αποτυχία","Τα πεδία δεν είναι σωστά") | ||
219 | + } else { | ||
220 | + self.showSendDialog() | ||
221 | + } | ||
222 | + } | ||
223 | + | ||
224 | +} | ||
225 | + | ||
226 | +// MARK: NumbersPopup | ||
227 | +extension ShareViewController: NumbersPopupDelegate { | ||
228 | + @objc func numbersPopupTapped(_ sender: Any) { | ||
229 | + let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | ||
230 | + // self.storyboard? | ||
231 | + let pp = storyboard.instantiateViewController(withIdentifier: "NumberPopupViewController") as! SwiftWarplyFramework.NumberPopupViewController | ||
232 | + pp.InitWithController(controller: self, | ||
233 | + numbersList: self.numbersList, | ||
234 | + sender: sender, | ||
235 | + delegate: self) | ||
236 | + } | ||
237 | + | ||
238 | + func presentedPopup() { | ||
239 | +// Code for when popup is presented | ||
240 | + } | ||
241 | + | ||
242 | + func dismissedPopup() { | ||
243 | +// Code for when popup is dismissed | ||
244 | + } | ||
245 | + | ||
246 | + func optionSelected(_ option: String) { | ||
247 | +// Code for when option is selected | ||
248 | + selectedNumber = option | ||
249 | + senderLabel.text = option | ||
250 | + } | ||
251 | +} | ||
252 | + |
... | @@ -378,6 +378,8 @@ WL_VERSION_INTERFACE() | ... | @@ -378,6 +378,8 @@ WL_VERSION_INTERFACE() |
378 | 378 | ||
379 | - (void) redeemCouponSetsWithSuccessBlock:(NSString*) uuid :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; | 379 | - (void) redeemCouponSetsWithSuccessBlock:(NSString*) uuid :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; |
380 | 380 | ||
381 | +- (void) cosmoteCouponSharingWithSuccessBlock:(NSString*) coupon :(NSString*)sender :(NSString*)receiver :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; | ||
382 | + | ||
381 | - (void) cosmoteSharingWithSuccessBlock:(NSString*) sharingId :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; | 383 | - (void) cosmoteSharingWithSuccessBlock:(NSString*) sharingId :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; |
382 | 384 | ||
383 | - (void) cosmoteRetrieveSharingWithSuccessBlock:(NSString*) sharingId :(NSNumber*)accept :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; | 385 | - (void) cosmoteRetrieveSharingWithSuccessBlock:(NSString*) sharingId :(NSNumber*)accept :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure; | ... | ... |
... | @@ -1949,7 +1949,48 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) | ... | @@ -1949,7 +1949,48 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) |
1949 | NSLog(@"Error at token %@", error ); | 1949 | NSLog(@"Error at token %@", error ); |
1950 | }]; | 1950 | }]; |
1951 | } | 1951 | } |
1952 | - NSLog(@"Error at get coupon sets %@", error ); | 1952 | + NSLog(@"Error at redeem coupon sets %@", error ); |
1953 | + } | ||
1954 | + }]; | ||
1955 | +} | ||
1956 | + | ||
1957 | +- (void) cosmoteCouponSharingWithSuccessBlock:(NSString*) coupon :(NSString*)sender :(NSString*)receiver :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure | ||
1958 | +{ | ||
1959 | + NSDictionary *postDictionary = @{@"coupon": @{@"action": @"share", @"coupon": coupon, @"sender_msisdn": sender, @"receiver_msisdn": receiver}}; | ||
1960 | + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:postDictionary options:0 error:NULL]; | ||
1961 | + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { | ||
1962 | + if (success) { | ||
1963 | + success(contextResponse); | ||
1964 | + } | ||
1965 | + NSLog(@"**************** WARPLY Response *****************" ); | ||
1966 | + NSLog(@"%@", contextResponse ); | ||
1967 | + } failureBlock:^(NSError *error) { | ||
1968 | + if (failure) { | ||
1969 | + NSDictionary* dict = [NSDictionary alloc]; | ||
1970 | + dict = [error userInfo]; | ||
1971 | + NSString* errorCode = [dict objectForKey:@"NSLocalizedDescription"]; | ||
1972 | + if ([errorCode isEqual:@"Request failed: unauthorized (401)"]) { | ||
1973 | + [self refreshToken:^(NSDictionary *response) { | ||
1974 | + [self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) { | ||
1975 | + if (success) { | ||
1976 | + success(contextResponse); | ||
1977 | + } | ||
1978 | + NSLog(@"**************** WARPLY Response *****************" ); | ||
1979 | + NSLog(@"%@", contextResponse ); | ||
1980 | + } failureBlock:^(NSError *error) { | ||
1981 | + if (failure) { | ||
1982 | + failure(error); | ||
1983 | + } | ||
1984 | + }]; | ||
1985 | + } failureBlock:^(NSError *error) { | ||
1986 | + if (failure) { | ||
1987 | + [_db executeUpdate:@"DROP TABLE requestVariables"]; | ||
1988 | + failure(error); | ||
1989 | + } | ||
1990 | + NSLog(@"Error at token %@", error ); | ||
1991 | + }]; | ||
1992 | + } | ||
1993 | + NSLog(@"Error at cosmote Coupon Sharing %@", error ); | ||
1953 | } | 1994 | } |
1954 | }]; | 1995 | }]; |
1955 | } | 1996 | } | ... | ... |
... | @@ -1215,6 +1215,9 @@ public class swiftApi { | ... | @@ -1215,6 +1215,9 @@ public class swiftApi { |
1215 | let profileDataResult = (profileDataDictionary["result"] as? [String: Any] ?? ["":""]) | 1215 | let profileDataResult = (profileDataDictionary["result"] as? [String: Any] ?? ["":""]) |
1216 | 1216 | ||
1217 | let tempProfile = ProfileModel(dictionary: profileDataResult) | 1217 | let tempProfile = ProfileModel(dictionary: profileDataResult) |
1218 | + | ||
1219 | + swiftApi().setConsumer(tempProfile ?? swiftApi.ProfileModel()) | ||
1220 | + swiftApi().setUserTag(tempProfile.badge ?? "") | ||
1218 | 1221 | ||
1219 | getProfileCallback(tempProfile); | 1222 | getProfileCallback(tempProfile); |
1220 | 1223 | ||
... | @@ -3034,4 +3037,32 @@ public class swiftApi { | ... | @@ -3034,4 +3037,32 @@ public class swiftApi { |
3034 | } | 3037 | } |
3035 | } | 3038 | } |
3036 | 3039 | ||
3040 | + | ||
3041 | + public func cosmoteCouponSharingAsync(coupon: String, sender: String, receiver: String, _ couponSharingCallback: @escaping (_ responseData: GenericResponseModel?) -> Void) -> Void { | ||
3042 | + | ||
3043 | + let instanceOfMyApi = MyApi() | ||
3044 | + instanceOfMyApi.cosmoteCouponSharingAsync(coupon, sender, receiver, requestCallback, failureBlock: requestFailureCallback) | ||
3045 | + | ||
3046 | + func requestCallback(_ responseData: [AnyHashable: Any]?) -> Void { | ||
3047 | + | ||
3048 | + if let responseDataDictionary = responseData as? [String: Any] { | ||
3049 | + | ||
3050 | + let tempResponse = GenericResponseModel(dictionary: responseDataDictionary) | ||
3051 | + | ||
3052 | + couponSharingCallback(tempResponse); | ||
3053 | + | ||
3054 | + } else { | ||
3055 | + couponSharingCallback(nil) | ||
3056 | + } | ||
3057 | + | ||
3058 | + } | ||
3059 | + | ||
3060 | + func requestFailureCallback(_ error: Error?) -> Void { | ||
3061 | + print("cosmoteCouponSharing error: ") | ||
3062 | + print(error) | ||
3063 | + print("====================") | ||
3064 | + couponSharingCallback(nil) | ||
3065 | + } | ||
3066 | + } | ||
3067 | + | ||
3037 | } | 3068 | } | ... | ... |
-
Please register or login to post a comment