Showing
4 changed files
with
397 additions
and
77 deletions
... | @@ -4222,17 +4222,239 @@ | ... | @@ -4222,17 +4222,239 @@ |
4222 | <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> | 4222 | <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> |
4223 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | 4223 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
4224 | <subviews> | 4224 | <subviews> |
4225 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="OffersViewController" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gBj-Dk-4Cd"> | 4225 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hUt-Dt-44M" userLabel="Main View"> |
4226 | - <rect key="frame" x="124" y="437" width="159" height="21"/> | 4226 | + <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> |
4227 | - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | 4227 | + <subviews> |
4228 | - <fontDescription key="fontDescription" type="system" pointSize="17"/> | 4228 | + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="fWD-iY-Bmd"> |
4229 | - <nil key="textColor"/> | 4229 | + <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> |
4230 | - <nil key="highlightedColor"/> | 4230 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
4231 | - </label> | 4231 | + <color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
4232 | + <prototypes> | ||
4233 | + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="OffersTableViewCellId" id="qj2-71-gcS" customClass="OffersTableViewCell" customModule="SwiftWarplyFramework"> | ||
4234 | + <rect key="frame" x="0.0" y="50" width="414" height="288"/> | ||
4235 | + <autoresizingMask key="autoresizingMask"/> | ||
4236 | + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="qj2-71-gcS" id="kjE-xJ-Y7S"> | ||
4237 | + <rect key="frame" x="0.0" y="0.0" width="414" height="288"/> | ||
4238 | + <autoresizingMask key="autoresizingMask"/> | ||
4239 | + <subviews> | ||
4240 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2H8-bM-vZr" userLabel="Cell View"> | ||
4241 | + <rect key="frame" x="20" y="0.0" width="374" height="288"/> | ||
4242 | + <subviews> | ||
4243 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ugy-l0-Fp3" userLabel="Campaign Image View"> | ||
4244 | + <rect key="frame" x="0.0" y="0.0" width="374" height="178"/> | ||
4245 | + <constraints> | ||
4246 | + <constraint firstAttribute="height" constant="178" id="3xe-hD-xPM"/> | ||
4247 | + </constraints> | ||
4248 | + </imageView> | ||
4249 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kZI-mH-ph2" userLabel="Info View"> | ||
4250 | + <rect key="frame" x="0.0" y="178" width="374" height="110"/> | ||
4251 | + <subviews> | ||
4252 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aZR-b5-0QS" userLabel="Info Inner View"> | ||
4253 | + <rect key="frame" x="20" y="32" width="334" height="46"/> | ||
4254 | + <subviews> | ||
4255 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qfZ-mQ-mRL" userLabel="Title Label"> | ||
4256 | + <rect key="frame" x="0.0" y="0.0" width="224" height="21.5"/> | ||
4257 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/> | ||
4258 | + <color key="textColor" red="0.36078431372549019" green="0.36078431372549019" blue="0.36078431372549019" alpha="1" colorSpace="calibratedRGB"/> | ||
4259 | + <nil key="highlightedColor"/> | ||
4260 | + </label> | ||
4261 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Seo-yy-aMh" userLabel="Subtitle Label"> | ||
4262 | + <rect key="frame" x="0.0" y="24.5" width="224" height="21.5"/> | ||
4263 | + <fontDescription key="fontDescription" type="system" pointSize="18"/> | ||
4264 | + <color key="textColor" red="0.36078431372549019" green="0.36078431372549019" blue="0.36078431372549019" alpha="1" colorSpace="calibratedRGB"/> | ||
4265 | + <nil key="highlightedColor"/> | ||
4266 | + </label> | ||
4267 | + </subviews> | ||
4268 | + <color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
4269 | + <constraints> | ||
4270 | + <constraint firstAttribute="bottom" secondItem="Seo-yy-aMh" secondAttribute="bottom" id="28O-Bf-5yx"/> | ||
4271 | + <constraint firstItem="Seo-yy-aMh" firstAttribute="top" secondItem="qfZ-mQ-mRL" secondAttribute="bottom" constant="3" id="3E4-m4-kYZ"/> | ||
4272 | + <constraint firstItem="qfZ-mQ-mRL" firstAttribute="leading" secondItem="aZR-b5-0QS" secondAttribute="leading" id="UT7-mm-qE8"/> | ||
4273 | + <constraint firstItem="Seo-yy-aMh" firstAttribute="leading" secondItem="aZR-b5-0QS" secondAttribute="leading" id="e4w-de-uGd"/> | ||
4274 | + <constraint firstItem="qfZ-mQ-mRL" firstAttribute="top" secondItem="aZR-b5-0QS" secondAttribute="top" id="rXT-QO-ygA"/> | ||
4275 | + </constraints> | ||
4276 | + </view> | ||
4277 | + </subviews> | ||
4278 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
4279 | + <constraints> | ||
4280 | + <constraint firstAttribute="height" constant="110" id="4yV-XS-4PN"/> | ||
4281 | + <constraint firstAttribute="trailing" secondItem="aZR-b5-0QS" secondAttribute="trailing" constant="20" id="p1K-A5-Xlv"/> | ||
4282 | + <constraint firstItem="aZR-b5-0QS" firstAttribute="leading" secondItem="kZI-mH-ph2" secondAttribute="leading" constant="20" id="qq7-8z-dyM"/> | ||
4283 | + <constraint firstItem="aZR-b5-0QS" firstAttribute="centerY" secondItem="kZI-mH-ph2" secondAttribute="centerY" id="swJ-jz-XdS"/> | ||
4284 | + </constraints> | ||
4285 | + </view> | ||
4286 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yY1-NG-BaX" userLabel="Discount View"> | ||
4287 | + <rect key="frame" x="244" y="120" width="130" height="130"/> | ||
4288 | + <subviews> | ||
4289 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="B4P-VR-pDO" userLabel="Discount Image View"> | ||
4290 | + <rect key="frame" x="0.0" y="0.0" width="130" height="130"/> | ||
4291 | + <constraints> | ||
4292 | + <constraint firstAttribute="width" constant="130" id="1pT-MH-uoQ"/> | ||
4293 | + <constraint firstAttribute="height" constant="130" id="h5Y-Yv-qc3"/> | ||
4294 | + </constraints> | ||
4295 | + </imageView> | ||
4296 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="f0e-Lz-WQc" userLabel="Discount Inner View"> | ||
4297 | + <rect key="frame" x="33" y="34.5" width="64" height="61"/> | ||
4298 | + <subviews> | ||
4299 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Msk-Tt-0US"> | ||
4300 | + <rect key="frame" x="18" y="0.0" width="28" height="28"/> | ||
4301 | + <constraints> | ||
4302 | + <constraint firstAttribute="width" constant="28" id="Plb-6p-pox"/> | ||
4303 | + <constraint firstAttribute="height" constant="28" id="g4M-Nh-h4e"/> | ||
4304 | + </constraints> | ||
4305 | + </imageView> | ||
4306 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lL4-jJ-mTZ"> | ||
4307 | + <rect key="frame" x="0.0" y="31" width="64" height="30"/> | ||
4308 | + <fontDescription key="fontDescription" type="boldSystem" pointSize="25"/> | ||
4309 | + <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
4310 | + <nil key="highlightedColor"/> | ||
4311 | + </label> | ||
4312 | + </subviews> | ||
4313 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
4314 | + <constraints> | ||
4315 | + <constraint firstItem="lL4-jJ-mTZ" firstAttribute="leading" secondItem="f0e-Lz-WQc" secondAttribute="leading" id="4xE-ie-F0U"/> | ||
4316 | + <constraint firstItem="Msk-Tt-0US" firstAttribute="top" secondItem="f0e-Lz-WQc" secondAttribute="top" id="GDu-Ps-8GB"/> | ||
4317 | + <constraint firstItem="Msk-Tt-0US" firstAttribute="centerX" secondItem="f0e-Lz-WQc" secondAttribute="centerX" id="Itg-2D-x2c"/> | ||
4318 | + <constraint firstAttribute="bottom" secondItem="lL4-jJ-mTZ" secondAttribute="bottom" id="Nsw-9N-Z3M"/> | ||
4319 | + <constraint firstAttribute="trailing" secondItem="lL4-jJ-mTZ" secondAttribute="trailing" id="Xxw-w1-4u9"/> | ||
4320 | + <constraint firstItem="lL4-jJ-mTZ" firstAttribute="top" secondItem="Msk-Tt-0US" secondAttribute="bottom" constant="3" id="ftg-Mz-i7E"/> | ||
4321 | + </constraints> | ||
4322 | + </view> | ||
4323 | + </subviews> | ||
4324 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
4325 | + <constraints> | ||
4326 | + <constraint firstItem="f0e-Lz-WQc" firstAttribute="centerX" secondItem="yY1-NG-BaX" secondAttribute="centerX" id="GO4-hM-RK0"/> | ||
4327 | + <constraint firstItem="B4P-VR-pDO" firstAttribute="leading" secondItem="yY1-NG-BaX" secondAttribute="leading" id="Oz5-XX-Bl1"/> | ||
4328 | + <constraint firstItem="f0e-Lz-WQc" firstAttribute="centerY" secondItem="yY1-NG-BaX" secondAttribute="centerY" id="Qyg-fx-qUn"/> | ||
4329 | + <constraint firstAttribute="bottom" secondItem="B4P-VR-pDO" secondAttribute="bottom" id="fOo-OH-cTL"/> | ||
4330 | + <constraint firstAttribute="trailing" secondItem="B4P-VR-pDO" secondAttribute="trailing" id="fc9-Yr-nWo"/> | ||
4331 | + <constraint firstItem="B4P-VR-pDO" firstAttribute="top" secondItem="yY1-NG-BaX" secondAttribute="top" id="vr6-Nu-eDg"/> | ||
4332 | + </constraints> | ||
4333 | + </view> | ||
4334 | + </subviews> | ||
4335 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
4336 | + <constraints> | ||
4337 | + <constraint firstAttribute="bottom" secondItem="kZI-mH-ph2" secondAttribute="bottom" id="6Vd-QN-Sy0"/> | ||
4338 | + <constraint firstItem="ugy-l0-Fp3" firstAttribute="leading" secondItem="2H8-bM-vZr" secondAttribute="leading" id="EPW-zB-5L5"/> | ||
4339 | + <constraint firstItem="yY1-NG-BaX" firstAttribute="leading" secondItem="Seo-yy-aMh" secondAttribute="trailing" id="Eq3-Wz-PV7"/> | ||
4340 | + <constraint firstItem="ugy-l0-Fp3" firstAttribute="top" secondItem="2H8-bM-vZr" secondAttribute="top" id="GBz-dh-6OV"/> | ||
4341 | + <constraint firstItem="kZI-mH-ph2" firstAttribute="leading" secondItem="2H8-bM-vZr" secondAttribute="leading" id="Mut-DB-tiP"/> | ||
4342 | + <constraint firstAttribute="trailing" secondItem="ugy-l0-Fp3" secondAttribute="trailing" id="UAw-w8-61R"/> | ||
4343 | + <constraint firstItem="yY1-NG-BaX" firstAttribute="leading" secondItem="qfZ-mQ-mRL" secondAttribute="trailing" id="VPy-aa-ulj"/> | ||
4344 | + <constraint firstAttribute="trailing" secondItem="kZI-mH-ph2" secondAttribute="trailing" id="gwi-NX-Lvz"/> | ||
4345 | + <constraint firstItem="yY1-NG-BaX" firstAttribute="top" secondItem="kZI-mH-ph2" secondAttribute="top" constant="-58" id="hrV-4a-Fyv"/> | ||
4346 | + <constraint firstItem="kZI-mH-ph2" firstAttribute="top" secondItem="ugy-l0-Fp3" secondAttribute="bottom" id="o7R-PR-ttI"/> | ||
4347 | + <constraint firstAttribute="trailing" secondItem="yY1-NG-BaX" secondAttribute="trailing" id="yPX-zT-MZh"/> | ||
4348 | + </constraints> | ||
4349 | + </view> | ||
4350 | + </subviews> | ||
4351 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
4352 | + <constraints> | ||
4353 | + <constraint firstItem="2H8-bM-vZr" firstAttribute="top" secondItem="kjE-xJ-Y7S" secondAttribute="top" id="6gO-Pq-FAs"/> | ||
4354 | + <constraint firstItem="2H8-bM-vZr" firstAttribute="leading" secondItem="kjE-xJ-Y7S" secondAttribute="leading" constant="20" id="K5t-uL-AUD"/> | ||
4355 | + <constraint firstAttribute="bottom" secondItem="2H8-bM-vZr" secondAttribute="bottom" id="Q9G-bY-tuz"/> | ||
4356 | + <constraint firstAttribute="trailing" secondItem="2H8-bM-vZr" secondAttribute="trailing" constant="20" id="QsI-tu-Vxn"/> | ||
4357 | + </constraints> | ||
4358 | + </tableViewCellContentView> | ||
4359 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
4360 | + <connections> | ||
4361 | + <outlet property="campaignImage" destination="ugy-l0-Fp3" id="UOO-N1-bSO"/> | ||
4362 | + <outlet property="cellView" destination="2H8-bM-vZr" id="jBR-Ya-Oh8"/> | ||
4363 | + <outlet property="discountBGImage" destination="B4P-VR-pDO" id="Xzc-R2-526"/> | ||
4364 | + <outlet property="discountLabel" destination="lL4-jJ-mTZ" id="1nC-jg-zOy"/> | ||
4365 | + <outlet property="discountSmileImage" destination="Msk-Tt-0US" id="WMM-lv-l5d"/> | ||
4366 | + <outlet property="subtitleLabel" destination="Seo-yy-aMh" id="P7t-RE-77P"/> | ||
4367 | + <outlet property="titleLabel" destination="qfZ-mQ-mRL" id="1Bw-YT-TGA"/> | ||
4368 | + </connections> | ||
4369 | + </tableViewCell> | ||
4370 | + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="InboxTableViewCellId" id="tNJ-bm-aGv" customClass="InboxTableViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> | ||
4371 | + <rect key="frame" x="0.0" y="338" width="414" height="78.5"/> | ||
4372 | + <autoresizingMask key="autoresizingMask"/> | ||
4373 | + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="tNJ-bm-aGv" id="A90-Li-IDd"> | ||
4374 | + <rect key="frame" x="0.0" y="0.0" width="414" height="78.5"/> | ||
4375 | + <autoresizingMask key="autoresizingMask"/> | ||
4376 | + <subviews> | ||
4377 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Iar-hb-ngF"> | ||
4378 | + <rect key="frame" x="20" y="0.0" width="374" height="78.5"/> | ||
4379 | + <subviews> | ||
4380 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="q3d-Y7-YoH"> | ||
4381 | + <rect key="frame" x="0.0" y="0.0" width="205.5" height="78.5"/> | ||
4382 | + </imageView> | ||
4383 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dNf-ph-58z"> | ||
4384 | + <rect key="frame" x="215.5" y="30" width="148.5" height="18.5"/> | ||
4385 | + <fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="15"/> | ||
4386 | + <color key="textColor" red="0.12941176469999999" green="0.12941176469999999" blue="0.12941176469999999" alpha="1" colorSpace="calibratedRGB"/> | ||
4387 | + <nil key="highlightedColor"/> | ||
4388 | + </label> | ||
4389 | + </subviews> | ||
4390 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
4391 | + <constraints> | ||
4392 | + <constraint firstAttribute="bottom" secondItem="q3d-Y7-YoH" secondAttribute="bottom" id="3lu-rv-RHI"/> | ||
4393 | + <constraint firstItem="dNf-ph-58z" firstAttribute="leading" secondItem="q3d-Y7-YoH" secondAttribute="trailing" constant="10" id="BE4-GU-dWc"/> | ||
4394 | + <constraint firstItem="q3d-Y7-YoH" firstAttribute="width" secondItem="Iar-hb-ngF" secondAttribute="width" multiplier="0.55" id="GNH-sm-qA8"/> | ||
4395 | + <constraint firstItem="q3d-Y7-YoH" firstAttribute="top" secondItem="Iar-hb-ngF" secondAttribute="top" id="H2X-D0-SQ0"/> | ||
4396 | + <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="dNf-ph-58z" secondAttribute="bottom" constant="10" id="HMr-jg-Egf"/> | ||
4397 | + <constraint firstItem="dNf-ph-58z" firstAttribute="centerY" secondItem="Iar-hb-ngF" secondAttribute="centerY" id="XRe-mw-R0J"/> | ||
4398 | + <constraint firstAttribute="trailing" secondItem="dNf-ph-58z" secondAttribute="trailing" constant="10" id="ZAx-jV-hle"/> | ||
4399 | + <constraint firstItem="q3d-Y7-YoH" firstAttribute="leading" secondItem="Iar-hb-ngF" secondAttribute="leading" id="d71-vY-Cgu"/> | ||
4400 | + <constraint firstItem="dNf-ph-58z" firstAttribute="top" relation="greaterThanOrEqual" secondItem="Iar-hb-ngF" secondAttribute="top" constant="30" id="oM5-Tj-eb3"/> | ||
4401 | + </constraints> | ||
4402 | + </view> | ||
4403 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="new_icon" translatesAutoresizingMaskIntoConstraints="NO" id="0IZ-qO-cKj"> | ||
4404 | + <rect key="frame" x="344" y="5" width="60" height="25"/> | ||
4405 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
4406 | + <constraints> | ||
4407 | + <constraint firstAttribute="width" constant="60" id="ltd-9h-en3"/> | ||
4408 | + <constraint firstAttribute="height" constant="25" id="sjV-4S-ggn"/> | ||
4409 | + </constraints> | ||
4410 | + </imageView> | ||
4411 | + </subviews> | ||
4412 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
4413 | + <constraints> | ||
4414 | + <constraint firstItem="0IZ-qO-cKj" firstAttribute="top" secondItem="A90-Li-IDd" secondAttribute="top" constant="5" id="1GR-gl-rM7"/> | ||
4415 | + <constraint firstAttribute="trailing" secondItem="0IZ-qO-cKj" secondAttribute="trailing" constant="10" id="6QW-pj-851"/> | ||
4416 | + <constraint firstItem="Iar-hb-ngF" firstAttribute="leading" secondItem="A90-Li-IDd" secondAttribute="leading" constant="20" id="DbD-oU-ViN"/> | ||
4417 | + <constraint firstAttribute="trailing" secondItem="Iar-hb-ngF" secondAttribute="trailing" constant="20" id="IQM-tY-Clq"/> | ||
4418 | + <constraint firstAttribute="bottom" secondItem="Iar-hb-ngF" secondAttribute="bottom" id="SKJ-aq-DIL"/> | ||
4419 | + <constraint firstItem="Iar-hb-ngF" firstAttribute="top" secondItem="A90-Li-IDd" secondAttribute="top" id="s7S-Fw-x5P"/> | ||
4420 | + </constraints> | ||
4421 | + </tableViewCellContentView> | ||
4422 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
4423 | + <connections> | ||
4424 | + <outlet property="campaignImage" destination="q3d-Y7-YoH" id="mSE-US-ead"/> | ||
4425 | + <outlet property="campaignTitleLabel" destination="dNf-ph-58z" id="OL1-vm-neo"/> | ||
4426 | + <outlet property="inboxView" destination="Iar-hb-ngF" id="sYI-hQ-yfh"/> | ||
4427 | + <outlet property="newBadgeImage" destination="0IZ-qO-cKj" id="2Vu-X1-ZX6"/> | ||
4428 | + </connections> | ||
4429 | + </tableViewCell> | ||
4430 | + </prototypes> | ||
4431 | + <connections> | ||
4432 | + <outlet property="dataSource" destination="EDh-Zo-yDu" id="Few-SN-h9B"/> | ||
4433 | + <outlet property="delegate" destination="EDh-Zo-yDu" id="3t7-6z-apW"/> | ||
4434 | + </connections> | ||
4435 | + </tableView> | ||
4436 | + </subviews> | ||
4437 | + <color key="backgroundColor" red="0.90588235294117647" green="0.91764705882352937" blue="0.92156862745098034" alpha="1" colorSpace="calibratedRGB"/> | ||
4438 | + <constraints> | ||
4439 | + <constraint firstAttribute="trailing" secondItem="fWD-iY-Bmd" secondAttribute="trailing" id="IPb-cu-IN9"/> | ||
4440 | + <constraint firstAttribute="bottom" secondItem="fWD-iY-Bmd" secondAttribute="bottom" id="J4w-D1-Meb"/> | ||
4441 | + <constraint firstItem="fWD-iY-Bmd" firstAttribute="leading" secondItem="hUt-Dt-44M" secondAttribute="leading" id="Lrg-dN-mYl"/> | ||
4442 | + <constraint firstItem="fWD-iY-Bmd" firstAttribute="top" secondItem="hUt-Dt-44M" secondAttribute="top" id="cyE-Nr-o0W"/> | ||
4443 | + </constraints> | ||
4444 | + </view> | ||
4232 | </subviews> | 4445 | </subviews> |
4233 | <viewLayoutGuide key="safeArea" id="CXd-ry-9QY"/> | 4446 | <viewLayoutGuide key="safeArea" id="CXd-ry-9QY"/> |
4234 | - <color key="backgroundColor" systemColor="systemBackgroundColor"/> | 4447 | + <color key="backgroundColor" red="0.90588235294117647" green="0.91764705882352937" blue="0.92156862745098034" alpha="1" colorSpace="calibratedRGB"/> |
4448 | + <constraints> | ||
4449 | + <constraint firstItem="hUt-Dt-44M" firstAttribute="leading" secondItem="AgP-hz-ava" secondAttribute="leading" id="1mG-HG-vHv"/> | ||
4450 | + <constraint firstAttribute="trailing" secondItem="hUt-Dt-44M" secondAttribute="trailing" id="rKd-e7-ZdE"/> | ||
4451 | + <constraint firstItem="hUt-Dt-44M" firstAttribute="top" secondItem="AgP-hz-ava" secondAttribute="top" id="rvX-7F-KDx"/> | ||
4452 | + <constraint firstAttribute="bottom" secondItem="hUt-Dt-44M" secondAttribute="bottom" id="scN-Hh-WVC"/> | ||
4453 | + </constraints> | ||
4235 | </view> | 4454 | </view> |
4455 | + <connections> | ||
4456 | + <outlet property="tableView" destination="fWD-iY-Bmd" id="Jds-Wd-Yb6"/> | ||
4457 | + </connections> | ||
4236 | </viewController> | 4458 | </viewController> |
4237 | <placeholder placeholderIdentifier="IBFirstResponder" id="877-ji-SVH" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> | 4459 | <placeholder placeholderIdentifier="IBFirstResponder" id="877-ji-SVH" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> |
4238 | </objects> | 4460 | </objects> | ... | ... |
... | @@ -8,10 +8,47 @@ | ... | @@ -8,10 +8,47 @@ |
8 | import UIKit | 8 | import UIKit |
9 | 9 | ||
10 | @objc public class OffersTableViewCell: UITableViewCell { | 10 | @objc public class OffersTableViewCell: UITableViewCell { |
11 | + @IBOutlet weak var cellView: UIView! | ||
12 | + @IBOutlet weak var campaignImage: UIImageView! | ||
13 | + @IBOutlet weak var titleLabel: UILabel! | ||
14 | + @IBOutlet weak var subtitleLabel: UILabel! | ||
15 | + @IBOutlet weak var discountBGImage: UIImageView! | ||
16 | + @IBOutlet weak var discountSmileImage: UIImageView! | ||
17 | + @IBOutlet weak var discountLabel: UILabel! | ||
18 | + | ||
19 | + var postImageURL: String? { | ||
20 | + didSet { | ||
21 | + if let url = postImageURL { | ||
22 | + self.campaignImage.image = UIImage() // UIImage(named: "loading") | ||
11 | 23 | ||
24 | + UIImage.loadImageUsingCacheWithUrlString(url) { image in | ||
25 | + // set the image only when we are still displaying the content for the image we finished downloading | ||
26 | + if url == self.postImageURL { | ||
27 | + self.campaignImage.image = image | ||
28 | + } | ||
29 | + } | ||
30 | + } | ||
31 | + else { | ||
32 | + self.campaignImage.image = nil | ||
33 | + } | ||
34 | + } | ||
35 | + } | ||
36 | + | ||
12 | public override func awakeFromNib() { | 37 | public override func awakeFromNib() { |
13 | super.awakeFromNib() | 38 | super.awakeFromNib() |
14 | - // Initialization code | 39 | + |
40 | + // Add shadow | ||
41 | + self.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.16).cgColor | ||
42 | + self.layer.shadowOffset = CGSize(width: 0.0, height: 3.0) | ||
43 | + self.layer.shadowOpacity = 1.0 | ||
44 | + self.layer.shadowRadius = 6.0 | ||
45 | + | ||
46 | + cellView.layer.cornerRadius = 5.0 | ||
47 | + cellView.clipsToBounds = true | ||
48 | + | ||
49 | + discountBGImage.image = UIImage(named: "offer_circle_orange", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) | ||
50 | + discountSmileImage.image = UIImage(named: "logo_smile_white_new", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) | ||
51 | + | ||
15 | } | 52 | } |
16 | 53 | ||
17 | public override func setSelected(_ selected: Bool, animated: Bool) { | 54 | public override func setSelected(_ selected: Bool, animated: Bool) { |
... | @@ -19,5 +56,22 @@ import UIKit | ... | @@ -19,5 +56,22 @@ import UIKit |
19 | 56 | ||
20 | // Configure the view for the selected state | 57 | // Configure the view for the selected state |
21 | } | 58 | } |
59 | + | ||
60 | + public override func layoutSubviews() { | ||
61 | + super.layoutSubviews() | ||
62 | + //set the values for top,left,bottom,right margins | ||
63 | + let margins = UIEdgeInsets(top: 0, left: 0, bottom: 20, right: 0) | ||
64 | + contentView.frame = contentView.frame.inset(by: margins) | ||
65 | + } | ||
66 | + | ||
67 | + | ||
68 | + func configureCell(campaign: swiftApi.CampaignItemModel) { | ||
69 | + // campaignImage.load(link: campaign.logo_url ?? "", placeholder: UIImage(), cache: URLCache()) | ||
70 | + self.postImageURL = campaign.logo_url ?? "" | ||
71 | + | ||
72 | + titleLabel.text = campaign.title ?? "" | ||
73 | + subtitleLabel.text = campaign.subtitle ?? "" | ||
74 | + discountLabel.text = "10%" | ||
75 | + } | ||
22 | 76 | ||
23 | } | 77 | } | ... | ... |
... | @@ -8,22 +8,117 @@ | ... | @@ -8,22 +8,117 @@ |
8 | import UIKit | 8 | import UIKit |
9 | 9 | ||
10 | @objc public class OffersViewController: UIViewController { | 10 | @objc public class OffersViewController: UIViewController { |
11 | - | 11 | + @IBOutlet weak var tableView: UITableView! |
12 | + | ||
13 | + public var campaigns:Array<swiftApi.CampaignItemModel> = [] { | ||
14 | + didSet { | ||
15 | + DispatchQueue.main.async { | ||
16 | + self.tableView.reloadData() | ||
17 | + } | ||
18 | + } | ||
19 | + } | ||
20 | + | ||
12 | public override func viewDidLoad() { | 21 | public override func viewDidLoad() { |
13 | super.viewDidLoad() | 22 | super.viewDidLoad() |
14 | 23 | ||
15 | - // Do any additional setup after loading the view. | 24 | + getCampaignsRequest() |
25 | + | ||
26 | + tableView.delegate = self | ||
27 | + tableView.dataSource = self | ||
28 | + tableView.contentInset.top = 25 | ||
29 | + } | ||
30 | + | ||
31 | + | ||
32 | +// MARK: - Requests | ||
33 | + func getCampaignsRequest() { | ||
34 | + swiftApi().getCampaignsAsyncNew(language: "en", filters: [String : Any](), getCampaignsCallback, failureCallback: {errorCode in | ||
35 | + print("========= getCampaignsCallback ERROR =========",errorCode) | ||
36 | + }) | ||
37 | + } | ||
38 | + | ||
39 | + func getCampaignsCallback (_ campaignsData: Array<swiftApi.CampaignItemModel>?) -> Void { | ||
40 | + if (campaignsData != nil) { | ||
41 | + DispatchQueue.main.async { | ||
42 | + self.campaigns = campaignsData ?? [] | ||
43 | + self.tableView.reloadData() | ||
44 | + } | ||
45 | + } else { | ||
46 | + print("========= getCampaignsCallback ERROR =========") | ||
47 | + } | ||
48 | + } | ||
49 | + | ||
50 | +} | ||
51 | + | ||
52 | +// MARK: - TableView | ||
53 | +extension OffersViewController: UITableViewDelegate, UITableViewDataSource{ | ||
54 | + | ||
55 | + public func numberOfSections(in tableView: UITableView) -> Int { | ||
56 | + return 1 | ||
16 | } | 57 | } |
17 | 58 | ||
59 | + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
60 | + return self.campaigns.count | ||
61 | + } | ||
62 | + | ||
63 | + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | ||
64 | + return 288.0 + 20.0 | ||
65 | +// return UITableViewAutomaticDimension | ||
66 | + } | ||
67 | + | ||
68 | + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
69 | + let cell = tableView.dequeueReusableCell(withIdentifier: "OffersTableViewCellId", for: indexPath) as! OffersTableViewCell | ||
70 | + | ||
71 | + cell.configureCell(campaign: campaigns[indexPath.row]) | ||
72 | + | ||
73 | + return cell | ||
74 | + } | ||
75 | + | ||
76 | + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ||
77 | + let status = swiftApi().getNetworkStatus() | ||
78 | + if (status == -1 || status == 0) { | ||
79 | + self.showDialog("Δεν υπάρχει σύνδεση","Αυτή τη στιγμή βρίσκεσαι εκτός σύνδεσης. Παρακαλούμε βεβαιώσου ότι είσαι συνδεδεμένος στο διαδίκτυο και προσπάθησε ξανά.") | ||
80 | + } else { | ||
81 | + | ||
82 | + let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | ||
83 | + let vc = storyboard.instantiateViewController(withIdentifier: "CampaignViewController") as! SwiftWarplyFramework.CampaignViewController | ||
84 | + var url = "" | ||
85 | + var params = "" | ||
86 | + | ||
87 | +// url = swiftApi().constructCampaignUrl(campaigns[indexPath.row]) | ||
88 | +// params = swiftApi().constructCampaignParams(campaigns[indexPath.row]) | ||
89 | + url = campaigns[indexPath.row].index_url ?? "" | ||
18 | 90 | ||
19 | - /* | 91 | + let encoder = JSONEncoder() |
20 | - // MARK: - Navigation | 92 | + encoder.outputFormatting = .prettyPrinted |
93 | + let data = try! encoder.encode(campaigns[indexPath.row]) | ||
21 | 94 | ||
22 | - // In a storyboard-based application, you will often want to do a little preparation before navigation | 95 | + print("Campaign_CLICK " + String(data: data, encoding: .utf8)!) |
23 | - override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | 96 | + |
24 | - // Get the new view controller using segue.destination. | 97 | + print("CampaignUrl url onclick: " + url) |
25 | - // Pass the selected object to the new view controller. | 98 | + vc.campaignUrl = url |
99 | + vc.params = params | ||
100 | + self.navigationController?.pushViewController(vc, animated: true) | ||
101 | + | ||
102 | + } | ||
26 | } | 103 | } |
27 | - */ | ||
28 | 104 | ||
105 | + func showDialog(_ alertTitle: String, _ alertSubTitle: String) -> Void { | ||
106 | + | ||
107 | + let alert = UIAlertController(title: alertTitle, message: alertSubTitle, preferredStyle: .alert) | ||
108 | + alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in | ||
109 | + switch action.style{ | ||
110 | + case .default: | ||
111 | + print("default") | ||
112 | + | ||
113 | + case .cancel: | ||
114 | + print("cancel") | ||
115 | + | ||
116 | + case .destructive: | ||
117 | + print("destructive") | ||
118 | + | ||
119 | + } | ||
120 | + })) | ||
121 | + self.present(alert, animated: true, completion: nil) | ||
122 | + } | ||
123 | + | ||
29 | } | 124 | } | ... | ... |
... | @@ -1456,16 +1456,10 @@ public class swiftApi { | ... | @@ -1456,16 +1456,10 @@ public class swiftApi { |
1456 | 1456 | ||
1457 | func campaignsCallback(_ campaignsData: [AnyHashable: Any]?) -> Void { | 1457 | func campaignsCallback(_ campaignsData: [AnyHashable: Any]?) -> Void { |
1458 | var campaignsArray:Array<CampaignItemModel> = [] | 1458 | var campaignsArray:Array<CampaignItemModel> = [] |
1459 | - var carouselArray:Array<CampaignItemModel> = [] | ||
1460 | 1459 | ||
1461 | if let responseDataDictionary = campaignsData as? [String: AnyObject] { | 1460 | if let responseDataDictionary = campaignsData as? [String: AnyObject] { |
1462 | 1461 | ||
1463 | if (responseDataDictionary["MAPP_CAMPAIGNING-status"] as? Int == 1) { | 1462 | if (responseDataDictionary["MAPP_CAMPAIGNING-status"] as? Int == 1) { |
1464 | - let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
1465 | - dynatraceEvent._eventName = "custom_success_campaigns_loyalty" | ||
1466 | - dynatraceEvent._parameters = nil | ||
1467 | - // SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
1468 | - | ||
1469 | if let responseDataMapp = responseDataDictionary["MAPP_CAMPAIGNING"] as? [String: Any] { | 1463 | if let responseDataMapp = responseDataDictionary["MAPP_CAMPAIGNING"] as? [String: Any] { |
1470 | if let responseDataCampaigns = responseDataMapp["campaigns"] as? [[String : Any]?] { | 1464 | if let responseDataCampaigns = responseDataMapp["campaigns"] as? [[String : Any]?] { |
1471 | 1465 | ||
... | @@ -1475,64 +1469,24 @@ public class swiftApi { | ... | @@ -1475,64 +1469,24 @@ public class swiftApi { |
1475 | campaignsArray.append(tempCampaign) | 1469 | campaignsArray.append(tempCampaign) |
1476 | } | 1470 | } |
1477 | } | 1471 | } |
1478 | - } | ||
1479 | - } else { | ||
1480 | - getCampaignsCallback(nil) | ||
1481 | - } | ||
1482 | - | ||
1483 | - swiftApi().getCampaignsPersonalizedAsync(language: language, filters: filters, {campaignsPersonalizedData in | ||
1484 | - | ||
1485 | - campaignsArray = campaignsArray + (campaignsPersonalizedData ?? []) | ||
1486 | - | ||
1487 | - swiftApi().setUniqueCampaignList(campaignsArray) | ||
1488 | - | ||
1489 | - carouselArray = campaignsArray.filter { | ||
1490 | - let tempCampaign = $0 | ||
1491 | - let isCarouselItem = (tempCampaign._carousel != nil) && (tempCampaign._carousel == "true") | ||
1492 | 1472 | ||
1493 | - return (isCarouselItem) | 1473 | + swiftApi().setUniqueCampaignList(campaignsArray) |
1494 | - } | ||
1495 | - swiftApi().setCarouselList(carouselArray) | ||
1496 | 1474 | ||
1497 | - var filteredCampaigns = campaignsArray.filter { | 1475 | + let sortedCampaigns = campaignsArray.sorted { |
1498 | - let tempCampaign = $0 | 1476 | + ($0._sorting ?? 0) < ($1._sorting ?? 0) |
1499 | - let isCcmsOffer = (tempCampaign.ccms_offer != nil) && (tempCampaign.ccms_offer != "") && (tempCampaign.ccms_offer == "true") | 1477 | + } |
1500 | - let isTelco = (tempCampaign._type != nil && tempCampaign._type == "telco") | ||
1501 | - | ||
1502 | - return (!(isCcmsOffer || isTelco)) | ||
1503 | - } | ||
1504 | - | ||
1505 | - // if (swiftApi().getConsumerInternal()?._answered == true) { | ||
1506 | - filteredCampaigns = filteredCampaigns.filter { $0.offer_category != "questionnaire" } | ||
1507 | - // } | ||
1508 | 1478 | ||
1509 | - let sortedCampaigns = filteredCampaigns.sorted { | 1479 | + getCampaignsCallback(sortedCampaigns) |
1510 | - ($0._sorting ?? 0) < ($1._sorting ?? 0) | ||
1511 | } | 1480 | } |
1512 | - | 1481 | + } else { |
1513 | - getCampaignsCallback(sortedCampaigns); | 1482 | + getCampaignsCallback(nil) |
1514 | - | 1483 | + } |
1515 | - // SwiftEventBus.post("campaigns_retrieved") | ||
1516 | - }, failureCallback: {errorCode in | ||
1517 | - | ||
1518 | - failureCallback(errorCode) | ||
1519 | - }) | ||
1520 | 1484 | ||
1521 | } else { | 1485 | } else { |
1522 | - let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
1523 | - dynatraceEvent._eventName = "custom_error_campaigns_loyalty" | ||
1524 | - dynatraceEvent._parameters = nil | ||
1525 | - // SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
1526 | - | ||
1527 | getCampaignsCallback(nil) | 1486 | getCampaignsCallback(nil) |
1528 | } | 1487 | } |
1529 | 1488 | ||
1530 | } else { | 1489 | } else { |
1531 | - let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
1532 | - dynatraceEvent._eventName = "custom_error_campaigns_loyalty" | ||
1533 | - dynatraceEvent._parameters = nil | ||
1534 | - // SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
1535 | - | ||
1536 | getCampaignsCallback(nil) | 1490 | getCampaignsCallback(nil) |
1537 | } | 1491 | } |
1538 | } | 1492 | } |
... | @@ -1542,11 +1496,6 @@ public class swiftApi { | ... | @@ -1542,11 +1496,6 @@ public class swiftApi { |
1542 | print(error) | 1496 | print(error) |
1543 | print("====================") | 1497 | print("====================") |
1544 | 1498 | ||
1545 | - let dynatraceEvent = swiftApi.LoyaltySDKDynatraceEventModel() | ||
1546 | - dynatraceEvent._eventName = "custom_error_campaigns_loyalty" | ||
1547 | - dynatraceEvent._parameters = nil | ||
1548 | - // SwiftEventBus.post("dynatrace", sender: dynatraceEvent) | ||
1549 | - | ||
1550 | getCampaignsCallback(nil) | 1499 | getCampaignsCallback(nil) |
1551 | } | 1500 | } |
1552 | } | 1501 | } | ... | ... |
-
Please register or login to post a comment