Showing
9 changed files
with
116 additions
and
20 deletions
No preview for this file type
... | @@ -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 | ... | ... |
This diff is collapsed. Click to expand it.
... | @@ -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 | ... | ... |
-
Please register or login to post a comment