Manos Chorianopoulos

possible fix for header line

...@@ -57,6 +57,9 @@ import SwiftEventBus ...@@ -57,6 +57,9 @@ import SwiftEventBus
57 topBorderLine.contentMode = .scaleAspectFit 57 topBorderLine.contentMode = .scaleAspectFit
58 58
59 NSLayoutConstraint.activate([ 59 NSLayoutConstraint.activate([
60 + topBorderLine.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0),
61 + topBorderLine.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0),
62 + topBorderLine.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0),
60 topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), 63 topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width),
61 topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) 64 topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
62 ]) 65 ])
......
...@@ -11,6 +11,7 @@ import AVFoundation ...@@ -11,6 +11,7 @@ import AVFoundation
11 // import SwiftEventBus 11 // import SwiftEventBus
12 12
13 @objc public class CouponBarcodeViewController: UIViewController { 13 @objc public class CouponBarcodeViewController: UIViewController {
14 + @IBOutlet weak var mainView: UIView!
14 @IBOutlet weak var backgroundImage: UIImageView! 15 @IBOutlet weak var backgroundImage: UIImageView!
15 @IBOutlet weak var scrollView: UIScrollView! 16 @IBOutlet weak var scrollView: UIScrollView!
16 @IBOutlet weak var scrollContentView: UIView! 17 @IBOutlet weak var scrollContentView: UIView!
...@@ -72,6 +73,9 @@ import AVFoundation ...@@ -72,6 +73,9 @@ import AVFoundation
72 topBorderLine.contentMode = .scaleAspectFit 73 topBorderLine.contentMode = .scaleAspectFit
73 74
74 NSLayoutConstraint.activate([ 75 NSLayoutConstraint.activate([
76 + topBorderLine.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0),
77 + topBorderLine.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0),
78 + topBorderLine.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0),
75 topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), 79 topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width),
76 topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) 80 topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
77 ]) 81 ])
......
...@@ -63,6 +63,9 @@ import SwiftEventBus ...@@ -63,6 +63,9 @@ import SwiftEventBus
63 topBorderLine.contentMode = .scaleAspectFit 63 topBorderLine.contentMode = .scaleAspectFit
64 64
65 NSLayoutConstraint.activate([ 65 NSLayoutConstraint.activate([
66 + topBorderLine.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0),
67 + topBorderLine.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0),
68 + topBorderLine.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0),
66 topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), 69 topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width),
67 topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) 70 topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
68 ]) 71 ])
......
...@@ -79,11 +79,14 @@ import SwiftEventBus ...@@ -79,11 +79,14 @@ import SwiftEventBus
79 topBorderShadow.translatesAutoresizingMaskIntoConstraints = false 79 topBorderShadow.translatesAutoresizingMaskIntoConstraints = false
80 topBorderShadow.image = image 80 topBorderShadow.image = image
81 topBorderShadow.contentMode = .scaleAspectFit 81 topBorderShadow.contentMode = .scaleAspectFit
82 - 82 +
83 - NSLayoutConstraint.activate([ 83 + NSLayoutConstraint.activate([
84 - topBorderShadow.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), 84 + topBorderShadow.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0),
85 - topBorderShadow.heightAnchor.constraint(equalTo: topBorderShadow.widthAnchor, multiplier: 1/aspectR) 85 + topBorderShadow.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0),
86 - ]) 86 + topBorderShadow.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0),
87 + topBorderShadow.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width),
88 + topBorderShadow.heightAnchor.constraint(equalTo: topBorderShadow.widthAnchor, multiplier: 1/aspectR)
89 + ])
87 90
88 } 91 }
89 92
......
...@@ -70,11 +70,14 @@ import SwiftEventBus ...@@ -70,11 +70,14 @@ import SwiftEventBus
70 topBorderShadow.translatesAutoresizingMaskIntoConstraints = false 70 topBorderShadow.translatesAutoresizingMaskIntoConstraints = false
71 topBorderShadow.image = image 71 topBorderShadow.image = image
72 topBorderShadow.contentMode = .scaleAspectFit 72 topBorderShadow.contentMode = .scaleAspectFit
73 - 73 +
74 - NSLayoutConstraint.activate([ 74 + NSLayoutConstraint.activate([
75 - topBorderShadow.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), 75 + topBorderShadow.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0),
76 - topBorderShadow.heightAnchor.constraint(equalTo: topBorderShadow.widthAnchor, multiplier: 1/aspectR) 76 + topBorderShadow.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0),
77 - ]) 77 + topBorderShadow.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0),
78 + topBorderShadow.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width),
79 + topBorderShadow.heightAnchor.constraint(equalTo: topBorderShadow.widthAnchor, multiplier: 1/aspectR)
80 + ])
78 81
79 } 82 }
80 83
......
...@@ -1624,6 +1624,7 @@ ...@@ -1624,6 +1624,7 @@
1624 <outlet property="couponView" destination="Zdf-1r-FdJ" id="OA8-73-e0p"/> 1624 <outlet property="couponView" destination="Zdf-1r-FdJ" id="OA8-73-e0p"/>
1625 <outlet property="discriptionLabel" destination="mri-Wl-spg" id="iuf-XL-NWH"/> 1625 <outlet property="discriptionLabel" destination="mri-Wl-spg" id="iuf-XL-NWH"/>
1626 <outlet property="expirationLabel" destination="UhC-Lj-tfN" id="9Hj-I1-nJa"/> 1626 <outlet property="expirationLabel" destination="UhC-Lj-tfN" id="9Hj-I1-nJa"/>
1627 + <outlet property="mainView" destination="P3Q-nP-aSj" id="pZK-pk-db5"/>
1627 <outlet property="mapButton" destination="W5f-1T-iW6" id="2IL-QE-TdM"/> 1628 <outlet property="mapButton" destination="W5f-1T-iW6" id="2IL-QE-TdM"/>
1628 <outlet property="nameLabel" destination="Xz4-EE-EzJ" id="zTY-n5-36h"/> 1629 <outlet property="nameLabel" destination="Xz4-EE-EzJ" id="zTY-n5-36h"/>
1629 <outlet property="redeemButton" destination="8cR-Rc-YMJ" id="atB-0m-8ff"/> 1630 <outlet property="redeemButton" destination="8cR-Rc-YMJ" id="atB-0m-8ff"/>
...@@ -2659,6 +2660,7 @@ ...@@ -2659,6 +2660,7 @@
2659 <outlet property="giftTypeLabel" destination="yXI-Ds-V0T" id="ux6-O8-GPe"/> 2660 <outlet property="giftTypeLabel" destination="yXI-Ds-V0T" id="ux6-O8-GPe"/>
2660 <outlet property="heroImage" destination="QlP-ct-u6O" id="lCm-UF-0Sy"/> 2661 <outlet property="heroImage" destination="QlP-ct-u6O" id="lCm-UF-0Sy"/>
2661 <outlet property="heroImageHeight" destination="v6r-oa-0XG" id="3Mg-z2-ETz"/> 2662 <outlet property="heroImageHeight" destination="v6r-oa-0XG" id="3Mg-z2-ETz"/>
2663 + <outlet property="mainView" destination="8dQ-SF-Z4E" id="SpH-kQ-TGd"/>
2662 <outlet property="moreButton" destination="ulI-Td-g6v" id="4Xj-S3-FzE"/> 2664 <outlet property="moreButton" destination="ulI-Td-g6v" id="4Xj-S3-FzE"/>
2663 <outlet property="moreTextView" destination="mCl-kM-ssj" id="cC6-pL-jqp"/> 2665 <outlet property="moreTextView" destination="mCl-kM-ssj" id="cC6-pL-jqp"/>
2664 <outlet property="moreTextViewHeight" destination="Uys-zo-ERe" id="W9H-V2-oOm"/> 2666 <outlet property="moreTextViewHeight" destination="Uys-zo-ERe" id="W9H-V2-oOm"/>
......
...@@ -10,6 +10,7 @@ import MapKit ...@@ -10,6 +10,7 @@ import MapKit
10 10
11 @objc public class MapsViewController: UIViewController, MKMapViewDelegate { 11 @objc public class MapsViewController: UIViewController, MKMapViewDelegate {
12 // ui 12 // ui
13 + @IBOutlet weak var mainView: UIView!
13 @IBOutlet weak var backgroundImage: UIImageView! 14 @IBOutlet weak var backgroundImage: UIImageView!
14 @IBOutlet private var mapView: MKMapView! 15 @IBOutlet private var mapView: MKMapView!
15 16
...@@ -63,6 +64,9 @@ import MapKit ...@@ -63,6 +64,9 @@ import MapKit
63 topBorderLine.contentMode = .scaleAspectFit 64 topBorderLine.contentMode = .scaleAspectFit
64 65
65 NSLayoutConstraint.activate([ 66 NSLayoutConstraint.activate([
67 + topBorderLine.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0),
68 + topBorderLine.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0),
69 + topBorderLine.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0),
66 topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), 70 topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width),
67 topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) 71 topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
68 ]) 72 ])
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
17 <outlet property="directionsButton" destination="bw3-J9-wHr" id="sSi-OK-KTA"/> 17 <outlet property="directionsButton" destination="bw3-J9-wHr" id="sSi-OK-KTA"/>
18 <outlet property="hoursView" destination="u9U-A7-lbO" id="xm5-gQ-zjh"/> 18 <outlet property="hoursView" destination="u9U-A7-lbO" id="xm5-gQ-zjh"/>
19 <outlet property="infoTopConstraint" destination="9av-UX-8VL" id="uKX-lw-OTH"/> 19 <outlet property="infoTopConstraint" destination="9av-UX-8VL" id="uKX-lw-OTH"/>
20 + <outlet property="mainView" destination="rKl-bF-Zpf" id="ghc-id-sqV"/>
20 <outlet property="mapView" destination="F1c-ck-cQa" id="cdx-31-BiL"/> 21 <outlet property="mapView" destination="F1c-ck-cQa" id="cdx-31-BiL"/>
21 <outlet property="nameImageView" destination="eDV-A1-pOO" id="JYq-eT-kEG"/> 22 <outlet property="nameImageView" destination="eDV-A1-pOO" id="JYq-eT-kEG"/>
22 <outlet property="nameView" destination="MsK-eg-pkk" id="60t-lm-O8m"/> 23 <outlet property="nameView" destination="MsK-eg-pkk" id="60t-lm-O8m"/>
......
...@@ -67,6 +67,9 @@ import SwiftEventBus ...@@ -67,6 +67,9 @@ import SwiftEventBus
67 topBorderLine.contentMode = .scaleAspectFit 67 topBorderLine.contentMode = .scaleAspectFit
68 68
69 NSLayoutConstraint.activate([ 69 NSLayoutConstraint.activate([
70 + topBorderLine.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0),
71 + topBorderLine.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0),
72 + topBorderLine.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0),
70 topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), 73 topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width),
71 topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) 74 topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
72 ]) 75 ])
......
...@@ -64,6 +64,9 @@ import SwiftEventBus ...@@ -64,6 +64,9 @@ import SwiftEventBus
64 topBorderLine.contentMode = .scaleAspectFit 64 topBorderLine.contentMode = .scaleAspectFit
65 65
66 NSLayoutConstraint.activate([ 66 NSLayoutConstraint.activate([
67 + topBorderLine.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0),
68 + topBorderLine.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0),
69 + topBorderLine.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0),
67 topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), 70 topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width),
68 topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) 71 topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
69 ]) 72 ])
......