Manos Chorianopoulos

fix top gradient border line

...@@ -17,6 +17,7 @@ import UIKit ...@@ -17,6 +17,7 @@ import UIKit
17 @IBOutlet weak var nameLabel: UILabel! 17 @IBOutlet weak var nameLabel: UILabel!
18 @IBOutlet weak var descriptionLabel: UILabel! 18 @IBOutlet weak var descriptionLabel: UILabel!
19 @IBOutlet weak var redeemButton: UIButton! 19 @IBOutlet weak var redeemButton: UIButton!
20 + @IBOutlet weak var topBorderLine: UIImageView!
20 21
21 public var ccms: swiftApi.LoyaltyContextualOfferModel? 22 public var ccms: swiftApi.LoyaltyContextualOfferModel?
22 23
...@@ -41,9 +42,22 @@ import UIKit ...@@ -41,9 +42,22 @@ import UIKit
41 42
42 backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) 43 backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
43 44
44 - scrollView.clipsToBounds = true 45 +// scrollView.clipsToBounds = true
45 - scrollView.layer.cornerRadius = 30 46 +// scrollView.layer.cornerRadius = 30
46 - scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius 47 +// scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
48 +
49 + let image = UIImage(named: "top_border_line", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)!
50 + var aspectR: CGFloat = 0.0
51 +
52 + aspectR = image.size.width/image.size.height
53 +
54 + topBorderLine.translatesAutoresizingMaskIntoConstraints = false
55 + topBorderLine.image = image
56 + topBorderLine.contentMode = .scaleAspectFit
57 +
58 + NSLayoutConstraint.activate([
59 + topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
60 + ])
47 61
48 couponImage.load(link: ccms?._imageUrl ?? "", placeholder: UIImage(), cache: URLCache()) 62 couponImage.load(link: ccms?._imageUrl ?? "", placeholder: UIImage(), cache: URLCache())
49 couponImage.contentMode = .scaleAspectFill 63 couponImage.contentMode = .scaleAspectFill
......
...@@ -37,6 +37,7 @@ import AVFoundation ...@@ -37,6 +37,7 @@ import AVFoundation
37 @IBOutlet weak var barcodeLabelTopSpace: NSLayoutConstraint! 37 @IBOutlet weak var barcodeLabelTopSpace: NSLayoutConstraint!
38 @IBOutlet weak var border2TopSpace: NSLayoutConstraint! 38 @IBOutlet weak var border2TopSpace: NSLayoutConstraint!
39 @IBOutlet weak var mapButton: UIButton! 39 @IBOutlet weak var mapButton: UIButton!
40 + @IBOutlet weak var topBorderLine: UIImageView!
40 41
41 let uiscreen: CGRect = UIScreen.main.bounds 42 let uiscreen: CGRect = UIScreen.main.bounds
42 43
...@@ -57,9 +58,22 @@ import AVFoundation ...@@ -57,9 +58,22 @@ import AVFoundation
57 58
58 backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) 59 backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
59 60
60 - scrollView.clipsToBounds = true 61 +// scrollView.clipsToBounds = true
61 - scrollView.layer.cornerRadius = 30 62 +// scrollView.layer.cornerRadius = 30
62 - scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius 63 +// scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
64 +
65 + let image = UIImage(named: "top_border_line", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)!
66 + var aspectR: CGFloat = 0.0
67 +
68 + aspectR = image.size.width/image.size.height
69 +
70 + topBorderLine.translatesAutoresizingMaskIntoConstraints = false
71 + topBorderLine.image = image
72 + topBorderLine.contentMode = .scaleAspectFit
73 +
74 + NSLayoutConstraint.activate([
75 + topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
76 + ])
63 77
64 // COUPONSET: desc, img_preview, name, terms 78 // COUPONSET: desc, img_preview, name, terms
65 // COUPON: coupon, expiration, discount, status 79 // COUPON: coupon, expiration, discount, status
......
...@@ -21,6 +21,7 @@ import SwiftEventBus ...@@ -21,6 +21,7 @@ import SwiftEventBus
21 @IBOutlet weak var termsButton: UIButton! 21 @IBOutlet weak var termsButton: UIButton!
22 @IBOutlet weak var termsTextView: UITextView! 22 @IBOutlet weak var termsTextView: UITextView!
23 @IBOutlet weak var termsTextViewHeight: NSLayoutConstraint! 23 @IBOutlet weak var termsTextViewHeight: NSLayoutConstraint!
24 + @IBOutlet weak var topBorderLine: UIImageView!
24 25
25 public var ccms: swiftApi.LoyaltyContextualOfferModel? 26 public var ccms: swiftApi.LoyaltyContextualOfferModel?
26 public var profile:swiftApi.ProfileModel? = swiftApi().getConsumer() 27 public var profile:swiftApi.ProfileModel? = swiftApi().getConsumer()
...@@ -48,9 +49,22 @@ import SwiftEventBus ...@@ -48,9 +49,22 @@ import SwiftEventBus
48 49
49 backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) 50 backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
50 51
51 - scrollView.clipsToBounds = true 52 +// scrollView.clipsToBounds = true
52 - scrollView.layer.cornerRadius = 30 53 +// scrollView.layer.cornerRadius = 30
53 - scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius 54 +// scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
55 +
56 + let image = UIImage(named: "top_border_line", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)!
57 + var aspectR: CGFloat = 0.0
58 +
59 + aspectR = image.size.width/image.size.height
60 +
61 + topBorderLine.translatesAutoresizingMaskIntoConstraints = false
62 + topBorderLine.image = image
63 + topBorderLine.contentMode = .scaleAspectFit
64 +
65 + NSLayoutConstraint.activate([
66 + topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
67 + ])
54 68
55 couponImage.load(link: couponset?.img_preview ?? "", placeholder: UIImage(), cache: URLCache()) 69 couponImage.load(link: couponset?.img_preview ?? "", placeholder: UIImage(), cache: URLCache())
56 couponImage.contentMode = .scaleAspectFill 70 couponImage.contentMode = .scaleAspectFill
......
...@@ -1568,19 +1568,30 @@ ...@@ -1568,19 +1568,30 @@
1568 <viewLayoutGuide key="contentLayoutGuide" id="4fu-Tq-CEO"/> 1568 <viewLayoutGuide key="contentLayoutGuide" id="4fu-Tq-CEO"/>
1569 <viewLayoutGuide key="frameLayoutGuide" id="282-tV-FBh"/> 1569 <viewLayoutGuide key="frameLayoutGuide" id="282-tV-FBh"/>
1570 </scrollView> 1570 </scrollView>
1571 + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PQs-Qn-5Rq">
1572 + <rect key="frame" x="0.0" y="420" width="414" height="11.5"/>
1573 + </imageView>
1571 </subviews> 1574 </subviews>
1572 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 1575 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
1573 <constraints> 1576 <constraints>
1577 + <constraint firstItem="PQs-Qn-5Rq" firstAttribute="leading" secondItem="P3Q-nP-aSj" secondAttribute="leading" id="93F-BU-7zv"/>
1574 <constraint firstItem="D1m-2B-ehg" firstAttribute="leading" secondItem="P3Q-nP-aSj" secondAttribute="leading" id="AMp-IG-CcQ"/> 1578 <constraint firstItem="D1m-2B-ehg" firstAttribute="leading" secondItem="P3Q-nP-aSj" secondAttribute="leading" id="AMp-IG-CcQ"/>
1575 <constraint firstItem="B6L-Zs-Vnz" firstAttribute="top" secondItem="P3Q-nP-aSj" secondAttribute="top" id="BfW-Mh-FDd"/> 1579 <constraint firstItem="B6L-Zs-Vnz" firstAttribute="top" secondItem="P3Q-nP-aSj" secondAttribute="top" id="BfW-Mh-FDd"/>
1576 <constraint firstItem="1ec-eH-fkX" firstAttribute="height" relation="greaterThanOrEqual" secondItem="P3Q-nP-aSj" secondAttribute="height" id="F9b-Gx-lxj"/> 1580 <constraint firstItem="1ec-eH-fkX" firstAttribute="height" relation="greaterThanOrEqual" secondItem="P3Q-nP-aSj" secondAttribute="height" id="F9b-Gx-lxj"/>
1577 <constraint firstAttribute="bottom" secondItem="B6L-Zs-Vnz" secondAttribute="bottom" id="OZW-L0-2gZ"/> 1581 <constraint firstAttribute="bottom" secondItem="B6L-Zs-Vnz" secondAttribute="bottom" id="OZW-L0-2gZ"/>
1578 <constraint firstAttribute="trailing" secondItem="D1m-2B-ehg" secondAttribute="trailing" id="OZg-9O-qKw"/> 1582 <constraint firstAttribute="trailing" secondItem="D1m-2B-ehg" secondAttribute="trailing" id="OZg-9O-qKw"/>
1579 - <constraint firstItem="D1m-2B-ehg" firstAttribute="top" secondItem="P3Q-nP-aSj" secondAttribute="top" constant="2" id="b1K-LA-UXY"/> 1583 + <constraint firstItem="PQs-Qn-5Rq" firstAttribute="top" secondItem="P3Q-nP-aSj" secondAttribute="top" id="Yp2-9M-DSP"/>
1584 + <constraint firstItem="D1m-2B-ehg" firstAttribute="top" secondItem="P3Q-nP-aSj" secondAttribute="top" id="b1K-LA-UXY"/>
1585 + <constraint firstAttribute="trailing" secondItem="PQs-Qn-5Rq" secondAttribute="trailing" id="ibn-xE-xh3"/>
1580 <constraint firstItem="B6L-Zs-Vnz" firstAttribute="leading" secondItem="P3Q-nP-aSj" secondAttribute="leading" id="oyw-NE-7bF"/> 1586 <constraint firstItem="B6L-Zs-Vnz" firstAttribute="leading" secondItem="P3Q-nP-aSj" secondAttribute="leading" id="oyw-NE-7bF"/>
1581 <constraint firstAttribute="trailing" secondItem="B6L-Zs-Vnz" secondAttribute="trailing" id="twW-h7-cNb"/> 1587 <constraint firstAttribute="trailing" secondItem="B6L-Zs-Vnz" secondAttribute="trailing" id="twW-h7-cNb"/>
1582 <constraint firstAttribute="bottom" secondItem="D1m-2B-ehg" secondAttribute="bottom" id="vw6-dc-3pg"/> 1588 <constraint firstAttribute="bottom" secondItem="D1m-2B-ehg" secondAttribute="bottom" id="vw6-dc-3pg"/>
1583 </constraints> 1589 </constraints>
1590 + <variation key="default">
1591 + <mask key="subviews">
1592 + <exclude reference="B6L-Zs-Vnz"/>
1593 + </mask>
1594 + </variation>
1584 </view> 1595 </view>
1585 </subviews> 1596 </subviews>
1586 <viewLayoutGuide key="safeArea" id="mZk-p4-W2P"/> 1597 <viewLayoutGuide key="safeArea" id="mZk-p4-W2P"/>
...@@ -1619,6 +1630,7 @@ ...@@ -1619,6 +1630,7 @@
1619 <outlet property="termsButton" destination="8UD-WL-JB7" id="azl-dZ-6ey"/> 1630 <outlet property="termsButton" destination="8UD-WL-JB7" id="azl-dZ-6ey"/>
1620 <outlet property="termsTextView" destination="xjX-HZ-MpD" id="8ZQ-e0-1Ib"/> 1631 <outlet property="termsTextView" destination="xjX-HZ-MpD" id="8ZQ-e0-1Ib"/>
1621 <outlet property="termsTextViewHeight" destination="3GU-tg-S3t" id="H3e-IQ-FGo"/> 1632 <outlet property="termsTextViewHeight" destination="3GU-tg-S3t" id="H3e-IQ-FGo"/>
1633 + <outlet property="topBorderLine" destination="PQs-Qn-5Rq" id="V9f-xB-2zP"/>
1622 </connections> 1634 </connections>
1623 </viewController> 1635 </viewController>
1624 <placeholder placeholderIdentifier="IBFirstResponder" id="tvH-ht-75E" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> 1636 <placeholder placeholderIdentifier="IBFirstResponder" id="tvH-ht-75E" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
...@@ -1785,19 +1797,30 @@ ...@@ -1785,19 +1797,30 @@
1785 <viewLayoutGuide key="contentLayoutGuide" id="fXc-vI-HgW"/> 1797 <viewLayoutGuide key="contentLayoutGuide" id="fXc-vI-HgW"/>
1786 <viewLayoutGuide key="frameLayoutGuide" id="wi0-bn-nU4"/> 1798 <viewLayoutGuide key="frameLayoutGuide" id="wi0-bn-nU4"/>
1787 </scrollView> 1799 </scrollView>
1800 + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Ndy-dK-SEh">
1801 + <rect key="frame" x="0.0" y="420" width="414" height="11.5"/>
1802 + </imageView>
1788 </subviews> 1803 </subviews>
1789 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 1804 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
1790 <constraints> 1805 <constraints>
1791 <constraint firstAttribute="trailing" secondItem="QF0-ih-7ii" secondAttribute="trailing" id="1Dp-wN-6ea"/> 1806 <constraint firstAttribute="trailing" secondItem="QF0-ih-7ii" secondAttribute="trailing" id="1Dp-wN-6ea"/>
1792 - <constraint firstItem="qjm-11-Clh" firstAttribute="top" secondItem="y5q-8M-0jB" secondAttribute="top" constant="2" id="KFV-m0-qD9"/> 1807 + <constraint firstItem="qjm-11-Clh" firstAttribute="top" secondItem="y5q-8M-0jB" secondAttribute="top" id="KFV-m0-qD9"/>
1793 <constraint firstAttribute="trailing" secondItem="qjm-11-Clh" secondAttribute="trailing" id="SLZ-0e-4Gf"/> 1808 <constraint firstAttribute="trailing" secondItem="qjm-11-Clh" secondAttribute="trailing" id="SLZ-0e-4Gf"/>
1794 <constraint firstItem="9kx-ct-jms" firstAttribute="height" relation="greaterThanOrEqual" secondItem="y5q-8M-0jB" secondAttribute="height" id="X7v-Nl-Qah"/> 1809 <constraint firstItem="9kx-ct-jms" firstAttribute="height" relation="greaterThanOrEqual" secondItem="y5q-8M-0jB" secondAttribute="height" id="X7v-Nl-Qah"/>
1810 + <constraint firstItem="Ndy-dK-SEh" firstAttribute="top" secondItem="y5q-8M-0jB" secondAttribute="top" id="bNQ-nG-5dQ"/>
1795 <constraint firstItem="QF0-ih-7ii" firstAttribute="leading" secondItem="y5q-8M-0jB" secondAttribute="leading" id="ioY-Nv-rN8"/> 1811 <constraint firstItem="QF0-ih-7ii" firstAttribute="leading" secondItem="y5q-8M-0jB" secondAttribute="leading" id="ioY-Nv-rN8"/>
1812 + <constraint firstItem="Ndy-dK-SEh" firstAttribute="leading" secondItem="y5q-8M-0jB" secondAttribute="leading" id="lUo-SN-OzX"/>
1796 <constraint firstItem="qjm-11-Clh" firstAttribute="leading" secondItem="y5q-8M-0jB" secondAttribute="leading" id="oVa-yv-1v2"/> 1813 <constraint firstItem="qjm-11-Clh" firstAttribute="leading" secondItem="y5q-8M-0jB" secondAttribute="leading" id="oVa-yv-1v2"/>
1814 + <constraint firstAttribute="trailing" secondItem="Ndy-dK-SEh" secondAttribute="trailing" id="otm-98-ABh"/>
1797 <constraint firstItem="QF0-ih-7ii" firstAttribute="top" secondItem="y5q-8M-0jB" secondAttribute="top" id="pO7-RQ-VKz"/> 1815 <constraint firstItem="QF0-ih-7ii" firstAttribute="top" secondItem="y5q-8M-0jB" secondAttribute="top" id="pO7-RQ-VKz"/>
1798 <constraint firstAttribute="bottom" secondItem="qjm-11-Clh" secondAttribute="bottom" id="rtH-Ju-JYH"/> 1816 <constraint firstAttribute="bottom" secondItem="qjm-11-Clh" secondAttribute="bottom" id="rtH-Ju-JYH"/>
1799 <constraint firstAttribute="bottom" secondItem="QF0-ih-7ii" secondAttribute="bottom" id="ry3-Ls-aHe"/> 1817 <constraint firstAttribute="bottom" secondItem="QF0-ih-7ii" secondAttribute="bottom" id="ry3-Ls-aHe"/>
1800 </constraints> 1818 </constraints>
1819 + <variation key="default">
1820 + <mask key="subviews">
1821 + <exclude reference="QF0-ih-7ii"/>
1822 + </mask>
1823 + </variation>
1801 </view> 1824 </view>
1802 </subviews> 1825 </subviews>
1803 <viewLayoutGuide key="safeArea" id="ca4-2z-k86"/> 1826 <viewLayoutGuide key="safeArea" id="ca4-2z-k86"/>
...@@ -1824,6 +1847,7 @@ ...@@ -1824,6 +1847,7 @@
1824 <outlet property="senderArrowImage" destination="Ul8-d9-FfM" id="dol-tk-Wt3"/> 1847 <outlet property="senderArrowImage" destination="Ul8-d9-FfM" id="dol-tk-Wt3"/>
1825 <outlet property="senderButton" destination="YD8-9K-Fp9" id="ZxN-6t-1SJ"/> 1848 <outlet property="senderButton" destination="YD8-9K-Fp9" id="ZxN-6t-1SJ"/>
1826 <outlet property="senderLabel" destination="GX7-IF-Gdd" id="U5C-LC-trH"/> 1849 <outlet property="senderLabel" destination="GX7-IF-Gdd" id="U5C-LC-trH"/>
1850 + <outlet property="topBorderLine" destination="Ndy-dK-SEh" id="kKE-Vf-wGQ"/>
1827 </connections> 1851 </connections>
1828 </viewController> 1852 </viewController>
1829 <placeholder placeholderIdentifier="IBFirstResponder" id="0nA-Nd-CMT" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> 1853 <placeholder placeholderIdentifier="IBFirstResponder" id="0nA-Nd-CMT" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
...@@ -2093,19 +2117,30 @@ ...@@ -2093,19 +2117,30 @@
2093 <viewLayoutGuide key="contentLayoutGuide" id="Fnc-An-qkX"/> 2117 <viewLayoutGuide key="contentLayoutGuide" id="Fnc-An-qkX"/>
2094 <viewLayoutGuide key="frameLayoutGuide" id="ffd-ce-497"/> 2118 <viewLayoutGuide key="frameLayoutGuide" id="ffd-ce-497"/>
2095 </scrollView> 2119 </scrollView>
2120 + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hcQ-Ve-1FD">
2121 + <rect key="frame" x="0.0" y="420" width="414" height="11.5"/>
2122 + </imageView>
2096 </subviews> 2123 </subviews>
2097 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 2124 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
2098 <constraints> 2125 <constraints>
2099 <constraint firstItem="1N5-oA-ZTb" firstAttribute="leading" secondItem="Jqu-cp-CWU" secondAttribute="leading" id="6xu-Fr-ayy"/> 2126 <constraint firstItem="1N5-oA-ZTb" firstAttribute="leading" secondItem="Jqu-cp-CWU" secondAttribute="leading" id="6xu-Fr-ayy"/>
2100 <constraint firstItem="Oep-XD-blB" firstAttribute="leading" secondItem="Jqu-cp-CWU" secondAttribute="leading" id="EcY-pv-yN5"/> 2127 <constraint firstItem="Oep-XD-blB" firstAttribute="leading" secondItem="Jqu-cp-CWU" secondAttribute="leading" id="EcY-pv-yN5"/>
2128 + <constraint firstAttribute="trailing" secondItem="hcQ-Ve-1FD" secondAttribute="trailing" id="I7B-N7-VTl"/>
2101 <constraint firstItem="uTN-Qr-wBi" firstAttribute="height" relation="greaterThanOrEqual" secondItem="Jqu-cp-CWU" secondAttribute="height" id="IW1-Sy-djh"/> 2129 <constraint firstItem="uTN-Qr-wBi" firstAttribute="height" relation="greaterThanOrEqual" secondItem="Jqu-cp-CWU" secondAttribute="height" id="IW1-Sy-djh"/>
2130 + <constraint firstItem="hcQ-Ve-1FD" firstAttribute="top" secondItem="Jqu-cp-CWU" secondAttribute="top" id="PES-LR-OoW"/>
2102 <constraint firstItem="Oep-XD-blB" firstAttribute="top" secondItem="Jqu-cp-CWU" secondAttribute="top" id="Ykm-QS-49G"/> 2131 <constraint firstItem="Oep-XD-blB" firstAttribute="top" secondItem="Jqu-cp-CWU" secondAttribute="top" id="Ykm-QS-49G"/>
2103 <constraint firstAttribute="trailing" secondItem="1N5-oA-ZTb" secondAttribute="trailing" id="dQR-wy-Qcd"/> 2132 <constraint firstAttribute="trailing" secondItem="1N5-oA-ZTb" secondAttribute="trailing" id="dQR-wy-Qcd"/>
2104 - <constraint firstItem="1N5-oA-ZTb" firstAttribute="top" secondItem="Jqu-cp-CWU" secondAttribute="top" constant="2" id="g8J-5T-9Mg"/> 2133 + <constraint firstItem="hcQ-Ve-1FD" firstAttribute="leading" secondItem="Jqu-cp-CWU" secondAttribute="leading" id="fuQ-bO-ePL"/>
2134 + <constraint firstItem="1N5-oA-ZTb" firstAttribute="top" secondItem="Jqu-cp-CWU" secondAttribute="top" id="g8J-5T-9Mg"/>
2105 <constraint firstAttribute="bottom" secondItem="1N5-oA-ZTb" secondAttribute="bottom" id="kaG-d8-5oJ"/> 2135 <constraint firstAttribute="bottom" secondItem="1N5-oA-ZTb" secondAttribute="bottom" id="kaG-d8-5oJ"/>
2106 <constraint firstAttribute="bottom" secondItem="Oep-XD-blB" secondAttribute="bottom" id="kkx-h0-joG"/> 2136 <constraint firstAttribute="bottom" secondItem="Oep-XD-blB" secondAttribute="bottom" id="kkx-h0-joG"/>
2107 <constraint firstAttribute="trailing" secondItem="Oep-XD-blB" secondAttribute="trailing" id="xnN-ZO-lA9"/> 2137 <constraint firstAttribute="trailing" secondItem="Oep-XD-blB" secondAttribute="trailing" id="xnN-ZO-lA9"/>
2108 </constraints> 2138 </constraints>
2139 + <variation key="default">
2140 + <mask key="subviews">
2141 + <exclude reference="Oep-XD-blB"/>
2142 + </mask>
2143 + </variation>
2109 </view> 2144 </view>
2110 </subviews> 2145 </subviews>
2111 <viewLayoutGuide key="safeArea" id="TUZ-8z-puM"/> 2146 <viewLayoutGuide key="safeArea" id="TUZ-8z-puM"/>
...@@ -2130,6 +2165,7 @@ ...@@ -2130,6 +2165,7 @@
2130 <outlet property="termsButton" destination="KvN-fk-rlm" id="pj7-bA-bhe"/> 2165 <outlet property="termsButton" destination="KvN-fk-rlm" id="pj7-bA-bhe"/>
2131 <outlet property="termsTextView" destination="siA-c8-Ub8" id="EfZ-wm-ED6"/> 2166 <outlet property="termsTextView" destination="siA-c8-Ub8" id="EfZ-wm-ED6"/>
2132 <outlet property="termsTextViewHeight" destination="BWJ-i6-UeO" id="GHO-YH-B9e"/> 2167 <outlet property="termsTextViewHeight" destination="BWJ-i6-UeO" id="GHO-YH-B9e"/>
2168 + <outlet property="topBorderLine" destination="hcQ-Ve-1FD" id="gJz-Qi-wo1"/>
2133 </connections> 2169 </connections>
2134 </viewController> 2170 </viewController>
2135 <placeholder placeholderIdentifier="IBFirstResponder" id="zFf-Es-4zg" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> 2171 <placeholder placeholderIdentifier="IBFirstResponder" id="zFf-Es-4zg" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
...@@ -2413,7 +2449,7 @@ ...@@ -2413,7 +2449,7 @@
2413 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8dQ-SF-Z4E"> 2449 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8dQ-SF-Z4E">
2414 <rect key="frame" x="0.0" y="44" width="414" height="852"/> 2450 <rect key="frame" x="0.0" y="44" width="414" height="852"/>
2415 <subviews> 2451 <subviews>
2416 - <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="coupons_scrollview_white" translatesAutoresizingMaskIntoConstraints="NO" id="6ch-LK-yKY"> 2452 + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="coupons_scrollview_white" translatesAutoresizingMaskIntoConstraints="NO" id="6ch-LK-yKY">
2417 <rect key="frame" x="0.0" y="0.0" width="414" height="852"/> 2453 <rect key="frame" x="0.0" y="0.0" width="414" height="852"/>
2418 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> 2454 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
2419 </imageView> 2455 </imageView>
...@@ -2582,15 +2618,26 @@ ...@@ -2582,15 +2618,26 @@
2582 <viewLayoutGuide key="contentLayoutGuide" id="BMi-Lt-iHA"/> 2618 <viewLayoutGuide key="contentLayoutGuide" id="BMi-Lt-iHA"/>
2583 <viewLayoutGuide key="frameLayoutGuide" id="lpe-11-PKD"/> 2619 <viewLayoutGuide key="frameLayoutGuide" id="lpe-11-PKD"/>
2584 </scrollView> 2620 </scrollView>
2621 + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="WsP-XD-haT">
2622 + <rect key="frame" x="0.0" y="420" width="414" height="11.5"/>
2623 + </imageView>
2585 </subviews> 2624 </subviews>
2586 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 2625 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
2587 <constraints> 2626 <constraints>
2588 - <constraint firstItem="AUR-1f-OXi" firstAttribute="top" secondItem="8dQ-SF-Z4E" secondAttribute="top" constant="2" id="2WB-7r-OOO"/> 2627 + <constraint firstItem="AUR-1f-OXi" firstAttribute="top" secondItem="8dQ-SF-Z4E" secondAttribute="top" id="2WB-7r-OOO"/>
2628 + <constraint firstItem="WsP-XD-haT" firstAttribute="leading" secondItem="8dQ-SF-Z4E" secondAttribute="leading" id="4gP-JN-7AO"/>
2589 <constraint firstAttribute="bottom" secondItem="AUR-1f-OXi" secondAttribute="bottom" id="4vG-Q8-bNz"/> 2629 <constraint firstAttribute="bottom" secondItem="AUR-1f-OXi" secondAttribute="bottom" id="4vG-Q8-bNz"/>
2630 + <constraint firstAttribute="trailing" secondItem="WsP-XD-haT" secondAttribute="trailing" id="Axz-ps-gqf"/>
2590 <constraint firstItem="YmP-9y-EV0" firstAttribute="height" relation="greaterThanOrEqual" secondItem="8dQ-SF-Z4E" secondAttribute="height" id="GdS-pE-6aU"/> 2631 <constraint firstItem="YmP-9y-EV0" firstAttribute="height" relation="greaterThanOrEqual" secondItem="8dQ-SF-Z4E" secondAttribute="height" id="GdS-pE-6aU"/>
2591 <constraint firstAttribute="trailing" secondItem="AUR-1f-OXi" secondAttribute="trailing" id="mNF-0M-9EM"/> 2632 <constraint firstAttribute="trailing" secondItem="AUR-1f-OXi" secondAttribute="trailing" id="mNF-0M-9EM"/>
2592 <constraint firstItem="AUR-1f-OXi" firstAttribute="leading" secondItem="8dQ-SF-Z4E" secondAttribute="leading" id="p3L-E5-UPD"/> 2633 <constraint firstItem="AUR-1f-OXi" firstAttribute="leading" secondItem="8dQ-SF-Z4E" secondAttribute="leading" id="p3L-E5-UPD"/>
2634 + <constraint firstItem="WsP-XD-haT" firstAttribute="top" secondItem="8dQ-SF-Z4E" secondAttribute="top" id="wEx-J2-Kvu"/>
2593 </constraints> 2635 </constraints>
2636 + <variation key="default">
2637 + <mask key="subviews">
2638 + <exclude reference="6ch-LK-yKY"/>
2639 + </mask>
2640 + </variation>
2594 </view> 2641 </view>
2595 </subviews> 2642 </subviews>
2596 <viewLayoutGuide key="safeArea" id="oUF-UR-3Da"/> 2643 <viewLayoutGuide key="safeArea" id="oUF-UR-3Da"/>
...@@ -2618,6 +2665,7 @@ ...@@ -2618,6 +2665,7 @@
2618 <outlet property="nameLabel" destination="XJ0-lK-2fk" id="tL4-Ay-gb9"/> 2665 <outlet property="nameLabel" destination="XJ0-lK-2fk" id="tL4-Ay-gb9"/>
2619 <outlet property="scrollContentView" destination="YmP-9y-EV0" id="PLV-e9-qOd"/> 2666 <outlet property="scrollContentView" destination="YmP-9y-EV0" id="PLV-e9-qOd"/>
2620 <outlet property="scrollView" destination="AUR-1f-OXi" id="u5N-8L-BVU"/> 2667 <outlet property="scrollView" destination="AUR-1f-OXi" id="u5N-8L-BVU"/>
2668 + <outlet property="topBorderLine" destination="WsP-XD-haT" id="xLG-6a-aSR"/>
2621 <outlet property="valueLabel" destination="G7w-Tk-Yfm" id="9oX-f1-xS4"/> 2669 <outlet property="valueLabel" destination="G7w-Tk-Yfm" id="9oX-f1-xS4"/>
2622 <outlet property="valueView" destination="7La-Zf-BX7" id="Jeq-bO-HrK"/> 2670 <outlet property="valueView" destination="7La-Zf-BX7" id="Jeq-bO-HrK"/>
2623 </connections> 2671 </connections>
...@@ -2707,19 +2755,30 @@ ...@@ -2707,19 +2755,30 @@
2707 <viewLayoutGuide key="contentLayoutGuide" id="SCq-zB-WYb"/> 2755 <viewLayoutGuide key="contentLayoutGuide" id="SCq-zB-WYb"/>
2708 <viewLayoutGuide key="frameLayoutGuide" id="Ian-NJ-q5c"/> 2756 <viewLayoutGuide key="frameLayoutGuide" id="Ian-NJ-q5c"/>
2709 </scrollView> 2757 </scrollView>
2758 + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="2cS-C7-kUz">
2759 + <rect key="frame" x="0.0" y="420" width="414" height="11.5"/>
2760 + </imageView>
2710 </subviews> 2761 </subviews>
2711 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 2762 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
2712 <constraints> 2763 <constraints>
2713 <constraint firstItem="7rs-yJ-Kvn" firstAttribute="leading" secondItem="gV8-Ze-9jD" secondAttribute="leading" id="2f9-NI-DVc"/> 2764 <constraint firstItem="7rs-yJ-Kvn" firstAttribute="leading" secondItem="gV8-Ze-9jD" secondAttribute="leading" id="2f9-NI-DVc"/>
2714 <constraint firstItem="fVG-0L-fYi" firstAttribute="leading" secondItem="gV8-Ze-9jD" secondAttribute="leading" id="8Wo-dr-SYr"/> 2765 <constraint firstItem="fVG-0L-fYi" firstAttribute="leading" secondItem="gV8-Ze-9jD" secondAttribute="leading" id="8Wo-dr-SYr"/>
2766 + <constraint firstItem="2cS-C7-kUz" firstAttribute="leading" secondItem="gV8-Ze-9jD" secondAttribute="leading" id="9NQ-xJ-p7b"/>
2715 <constraint firstAttribute="bottom" secondItem="fVG-0L-fYi" secondAttribute="bottom" id="F1h-dY-Qy9"/> 2767 <constraint firstAttribute="bottom" secondItem="fVG-0L-fYi" secondAttribute="bottom" id="F1h-dY-Qy9"/>
2716 <constraint firstItem="7rs-yJ-Kvn" firstAttribute="top" secondItem="gV8-Ze-9jD" secondAttribute="top" id="Qqw-BH-PAa"/> 2768 <constraint firstItem="7rs-yJ-Kvn" firstAttribute="top" secondItem="gV8-Ze-9jD" secondAttribute="top" id="Qqw-BH-PAa"/>
2717 <constraint firstAttribute="bottom" secondItem="7rs-yJ-Kvn" secondAttribute="bottom" id="Syn-fK-lXo"/> 2769 <constraint firstAttribute="bottom" secondItem="7rs-yJ-Kvn" secondAttribute="bottom" id="Syn-fK-lXo"/>
2770 + <constraint firstAttribute="trailing" secondItem="2cS-C7-kUz" secondAttribute="trailing" id="Trd-n7-OVT"/>
2718 <constraint firstAttribute="trailing" secondItem="fVG-0L-fYi" secondAttribute="trailing" id="chL-lE-bqc"/> 2771 <constraint firstAttribute="trailing" secondItem="fVG-0L-fYi" secondAttribute="trailing" id="chL-lE-bqc"/>
2719 <constraint firstItem="NHe-cF-AMf" firstAttribute="height" relation="greaterThanOrEqual" secondItem="gV8-Ze-9jD" secondAttribute="height" id="l9o-Lk-50b"/> 2772 <constraint firstItem="NHe-cF-AMf" firstAttribute="height" relation="greaterThanOrEqual" secondItem="gV8-Ze-9jD" secondAttribute="height" id="l9o-Lk-50b"/>
2720 - <constraint firstItem="fVG-0L-fYi" firstAttribute="top" secondItem="gV8-Ze-9jD" secondAttribute="top" constant="2" id="qnB-Bi-4Qj"/> 2773 + <constraint firstItem="fVG-0L-fYi" firstAttribute="top" secondItem="gV8-Ze-9jD" secondAttribute="top" id="qnB-Bi-4Qj"/>
2721 <constraint firstAttribute="trailing" secondItem="7rs-yJ-Kvn" secondAttribute="trailing" id="tpM-bQ-uV4"/> 2774 <constraint firstAttribute="trailing" secondItem="7rs-yJ-Kvn" secondAttribute="trailing" id="tpM-bQ-uV4"/>
2775 + <constraint firstItem="2cS-C7-kUz" firstAttribute="top" secondItem="gV8-Ze-9jD" secondAttribute="top" id="uzM-0H-7yH"/>
2722 </constraints> 2776 </constraints>
2777 + <variation key="default">
2778 + <mask key="subviews">
2779 + <exclude reference="7rs-yJ-Kvn"/>
2780 + </mask>
2781 + </variation>
2723 </view> 2782 </view>
2724 </subviews> 2783 </subviews>
2725 <viewLayoutGuide key="safeArea" id="meX-xg-hMW"/> 2784 <viewLayoutGuide key="safeArea" id="meX-xg-hMW"/>
...@@ -2741,6 +2800,7 @@ ...@@ -2741,6 +2800,7 @@
2741 <outlet property="redeemButton" destination="qnn-bi-fLK" id="GzF-I5-zC3"/> 2800 <outlet property="redeemButton" destination="qnn-bi-fLK" id="GzF-I5-zC3"/>
2742 <outlet property="scrollContentView" destination="NHe-cF-AMf" id="Jgu-0v-nhF"/> 2801 <outlet property="scrollContentView" destination="NHe-cF-AMf" id="Jgu-0v-nhF"/>
2743 <outlet property="scrollView" destination="fVG-0L-fYi" id="Ia7-im-DSP"/> 2802 <outlet property="scrollView" destination="fVG-0L-fYi" id="Ia7-im-DSP"/>
2803 + <outlet property="topBorderLine" destination="2cS-C7-kUz" id="wxQ-K4-mao"/>
2744 </connections> 2804 </connections>
2745 </viewController> 2805 </viewController>
2746 <placeholder placeholderIdentifier="IBFirstResponder" id="LXH-Az-i1V" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> 2806 <placeholder placeholderIdentifier="IBFirstResponder" id="LXH-Az-i1V" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
......
...@@ -22,6 +22,7 @@ import MapKit ...@@ -22,6 +22,7 @@ import MapKit
22 @IBOutlet private var addressView: UILabel! 22 @IBOutlet private var addressView: UILabel!
23 @IBOutlet private var directionsButton: CSMButton! 23 @IBOutlet private var directionsButton: CSMButton!
24 @IBOutlet private var infoTopConstraint: NSLayoutConstraint! 24 @IBOutlet private var infoTopConstraint: NSLayoutConstraint!
25 + @IBOutlet weak var topBorderLine: UIImageView!
25 26
26 // public 27 // public
27 public var couponSet: swiftApi.CouponSetItemModel? 28 public var couponSet: swiftApi.CouponSetItemModel?
...@@ -48,9 +49,22 @@ import MapKit ...@@ -48,9 +49,22 @@ import MapKit
48 mapView.delegate = self 49 mapView.delegate = self
49 mapView.centerToLocation(initialLocation, regionRadius: 1000000) 50 mapView.centerToLocation(initialLocation, regionRadius: 1000000)
50 51
51 - mapView.clipsToBounds = true 52 +// mapView.clipsToBounds = true
52 - mapView.layer.cornerRadius = 30 53 +// mapView.layer.cornerRadius = 30
53 - mapView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius 54 +// mapView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
55 +
56 + let image = UIImage(named: "top_border_line", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)!
57 + var aspectR: CGFloat = 0.0
58 +
59 + aspectR = image.size.width/image.size.height
60 +
61 + topBorderLine.translatesAutoresizingMaskIntoConstraints = false
62 + topBorderLine.image = image
63 + topBorderLine.contentMode = .scaleAspectFit
64 +
65 + NSLayoutConstraint.activate([
66 + topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
67 + ])
54 68
55 69
56 closeButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) 70 closeButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5)
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
22 <outlet property="nameView" destination="MsK-eg-pkk" id="60t-lm-O8m"/> 22 <outlet property="nameView" destination="MsK-eg-pkk" id="60t-lm-O8m"/>
23 <outlet property="phoneView" destination="knh-D9-CuM" id="ES2-6e-vRx"/> 23 <outlet property="phoneView" destination="knh-D9-CuM" id="ES2-6e-vRx"/>
24 <outlet property="titleView" destination="oVh-dv-f7a" id="dst-Ku-EFw"/> 24 <outlet property="titleView" destination="oVh-dv-f7a" id="dst-Ku-EFw"/>
25 + <outlet property="topBorderLine" destination="Z8H-fT-Lo9" id="Vl0-Nb-YhC"/>
25 <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> 26 <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
26 </connections> 27 </connections>
27 </placeholder> 28 </placeholder>
...@@ -37,20 +38,31 @@ ...@@ -37,20 +38,31 @@
37 <rect key="frame" x="0.0" y="0.0" width="414" height="852"/> 38 <rect key="frame" x="0.0" y="0.0" width="414" height="852"/>
38 </imageView> 39 </imageView>
39 <mapView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" mapType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="F1c-ck-cQa"> 40 <mapView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" mapType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="F1c-ck-cQa">
40 - <rect key="frame" x="0.0" y="2" width="414" height="850"/> 41 + <rect key="frame" x="0.0" y="0.0" width="414" height="852"/>
41 </mapView> 42 </mapView>
43 + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Z8H-fT-Lo9">
44 + <rect key="frame" x="0.0" y="420" width="414" height="11.5"/>
45 + </imageView>
42 </subviews> 46 </subviews>
43 <color key="backgroundColor" systemColor="systemBackgroundColor"/> 47 <color key="backgroundColor" systemColor="systemBackgroundColor"/>
44 <constraints> 48 <constraints>
45 <constraint firstAttribute="bottom" secondItem="tVJ-fk-ani" secondAttribute="bottom" id="5cR-5W-AwC"/> 49 <constraint firstAttribute="bottom" secondItem="tVJ-fk-ani" secondAttribute="bottom" id="5cR-5W-AwC"/>
46 <constraint firstItem="tVJ-fk-ani" firstAttribute="top" secondItem="rKl-bF-Zpf" secondAttribute="top" id="EMb-Ay-M18"/> 50 <constraint firstItem="tVJ-fk-ani" firstAttribute="top" secondItem="rKl-bF-Zpf" secondAttribute="top" id="EMb-Ay-M18"/>
51 + <constraint firstItem="Z8H-fT-Lo9" firstAttribute="leading" secondItem="rKl-bF-Zpf" secondAttribute="leading" id="Kwp-fj-9nx"/>
47 <constraint firstAttribute="trailing" secondItem="tVJ-fk-ani" secondAttribute="trailing" id="LLM-SY-Ejo"/> 52 <constraint firstAttribute="trailing" secondItem="tVJ-fk-ani" secondAttribute="trailing" id="LLM-SY-Ejo"/>
48 <constraint firstItem="F1c-ck-cQa" firstAttribute="leading" secondItem="rKl-bF-Zpf" secondAttribute="leading" id="P7b-Km-FIn"/> 53 <constraint firstItem="F1c-ck-cQa" firstAttribute="leading" secondItem="rKl-bF-Zpf" secondAttribute="leading" id="P7b-Km-FIn"/>
49 - <constraint firstItem="F1c-ck-cQa" firstAttribute="top" secondItem="rKl-bF-Zpf" secondAttribute="top" constant="2" id="X2Z-Vc-V9u"/> 54 + <constraint firstItem="Z8H-fT-Lo9" firstAttribute="top" secondItem="rKl-bF-Zpf" secondAttribute="top" id="VAV-Go-hI2"/>
55 + <constraint firstItem="F1c-ck-cQa" firstAttribute="top" secondItem="rKl-bF-Zpf" secondAttribute="top" id="X2Z-Vc-V9u"/>
50 <constraint firstAttribute="trailing" secondItem="F1c-ck-cQa" secondAttribute="trailing" id="dcT-Pn-T5v"/> 56 <constraint firstAttribute="trailing" secondItem="F1c-ck-cQa" secondAttribute="trailing" id="dcT-Pn-T5v"/>
51 <constraint firstItem="tVJ-fk-ani" firstAttribute="leading" secondItem="rKl-bF-Zpf" secondAttribute="leading" id="eVM-4A-gJc"/> 57 <constraint firstItem="tVJ-fk-ani" firstAttribute="leading" secondItem="rKl-bF-Zpf" secondAttribute="leading" id="eVM-4A-gJc"/>
52 <constraint firstAttribute="bottom" secondItem="F1c-ck-cQa" secondAttribute="bottom" id="ipi-oy-9jV"/> 58 <constraint firstAttribute="bottom" secondItem="F1c-ck-cQa" secondAttribute="bottom" id="ipi-oy-9jV"/>
59 + <constraint firstAttribute="trailing" secondItem="Z8H-fT-Lo9" secondAttribute="trailing" id="nUU-tN-OvE"/>
53 </constraints> 60 </constraints>
61 + <variation key="default">
62 + <mask key="subviews">
63 + <exclude reference="tVJ-fk-ani"/>
64 + </mask>
65 + </variation>
54 </view> 66 </view>
55 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zc1-ew-qcl"> 67 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zc1-ew-qcl">
56 <rect key="frame" x="0.0" y="576" width="414" height="320"/> 68 <rect key="frame" x="0.0" y="576" width="414" height="320"/>
......
...@@ -23,6 +23,7 @@ import SwiftEventBus ...@@ -23,6 +23,7 @@ import SwiftEventBus
23 @IBOutlet weak var senderButton: UIButton! 23 @IBOutlet weak var senderButton: UIButton!
24 @IBOutlet weak var numberTextField: UITextField! 24 @IBOutlet weak var numberTextField: UITextField!
25 @IBOutlet weak var redeemButton: UIButton! 25 @IBOutlet weak var redeemButton: UIButton!
26 + @IBOutlet weak var topBorderLine: UIImageView!
26 27
27 let uiscreen: CGRect = UIScreen.main.bounds 28 let uiscreen: CGRect = UIScreen.main.bounds
28 29
...@@ -52,9 +53,22 @@ import SwiftEventBus ...@@ -52,9 +53,22 @@ import SwiftEventBus
52 53
53 backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) 54 backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
54 55
55 - scrollView.clipsToBounds = true 56 +// scrollView.clipsToBounds = true
56 - scrollView.layer.cornerRadius = 30 57 +// scrollView.layer.cornerRadius = 30
57 - scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius 58 +// scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
59 +
60 + let image = UIImage(named: "top_border_line", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)!
61 + var aspectR: CGFloat = 0.0
62 +
63 + aspectR = image.size.width/image.size.height
64 +
65 + topBorderLine.translatesAutoresizingMaskIntoConstraints = false
66 + topBorderLine.image = image
67 + topBorderLine.contentMode = .scaleAspectFit
68 +
69 + NSLayoutConstraint.activate([
70 + topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
71 + ])
58 72
59 // COUPONSET: desc, img_preview, name, terms 73 // COUPONSET: desc, img_preview, name, terms
60 // COUPON: coupon, expiration, discount, status 74 // COUPON: coupon, expiration, discount, status
......
...@@ -26,6 +26,7 @@ import UIKit ...@@ -26,6 +26,7 @@ import UIKit
26 @IBOutlet weak var moreButton: UIButton! 26 @IBOutlet weak var moreButton: UIButton!
27 @IBOutlet weak var moreTextView: UITextView! 27 @IBOutlet weak var moreTextView: UITextView!
28 @IBOutlet weak var moreTextViewHeight: NSLayoutConstraint! 28 @IBOutlet weak var moreTextViewHeight: NSLayoutConstraint!
29 + @IBOutlet weak var topBorderLine: UIImageView!
29 30
30 let uiscreen: CGRect = UIScreen.main.bounds 31 let uiscreen: CGRect = UIScreen.main.bounds
31 32
...@@ -52,9 +53,22 @@ import UIKit ...@@ -52,9 +53,22 @@ import UIKit
52 53
53 backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) 54 backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
54 55
55 - scrollView.clipsToBounds = true 56 + let image = UIImage(named: "top_border_line", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)!
56 - scrollView.layer.cornerRadius = 30 57 + var aspectR: CGFloat = 0.0
57 - scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius 58 +
59 + aspectR = image.size.width/image.size.height
60 +
61 + topBorderLine.translatesAutoresizingMaskIntoConstraints = false
62 + topBorderLine.image = image
63 + topBorderLine.contentMode = .scaleAspectFit
64 +
65 + NSLayoutConstraint.activate([
66 + topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
67 + ])
68 +
69 +// scrollView.clipsToBounds = true
70 +// scrollView.layer.cornerRadius = 30
71 +// scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
58 72
59 heroImage.load(link: ccms?._imageOfferUrl ?? "", placeholder: UIImage(), cache: URLCache()) 73 heroImage.load(link: ccms?._imageOfferUrl ?? "", placeholder: UIImage(), cache: URLCache())
60 heroImage.contentMode = .scaleAspectFill 74 heroImage.contentMode = .scaleAspectFill
......