Manos Chorianopoulos

MapsViewController ui fixes

...@@ -29,7 +29,8 @@ private extension CSMButton { ...@@ -29,7 +29,8 @@ private extension CSMButton {
29 setImage(UIImage(named: "ic_directions", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) 29 setImage(UIImage(named: "ic_directions", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
30 titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 18) 30 titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 18)
31 setTitleColor(.white, for: .normal) 31 setTitleColor(.white, for: .normal)
32 - backgroundColor = UIColor(rgb: 0x79BF14) 32 +// backgroundColor = UIColor(rgb: 0x79BF14)
33 + backgroundColor = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00)
33 layer.cornerRadius = 12.0 34 layer.cornerRadius = 12.0
34 35
35 imageEdgeInsets = UIEdgeInsets(top:0.0, left:0.0, bottom:0.0, right:5.0); 36 imageEdgeInsets = UIEdgeInsets(top:0.0, left:0.0, bottom:0.0, right:5.0);
......
...@@ -21,9 +21,11 @@ import MapKit ...@@ -21,9 +21,11 @@ import MapKit
21 @IBOutlet private var hoursView: UILabel! 21 @IBOutlet private var hoursView: UILabel!
22 @IBOutlet private var phoneView: UILabel! 22 @IBOutlet private var phoneView: UILabel!
23 @IBOutlet private var addressView: UILabel! 23 @IBOutlet private var addressView: UILabel!
24 - @IBOutlet private var directionsButton: CSMButton! 24 + @IBOutlet private var directionsButton: UIButton!
25 @IBOutlet private var infoTopConstraint: NSLayoutConstraint! 25 @IBOutlet private var infoTopConstraint: NSLayoutConstraint!
26 @IBOutlet weak var topBorderLine: UIImageView! 26 @IBOutlet weak var topBorderLine: UIImageView!
27 + @IBOutlet weak var phoneImageView: UIImageView!
28 + @IBOutlet weak var addressImageView: UIImageView!
27 29
28 // public 30 // public
29 public var couponSet: swiftApi.CouponSetItemModel? 31 public var couponSet: swiftApi.CouponSetItemModel?
...@@ -48,6 +50,8 @@ import MapKit ...@@ -48,6 +50,8 @@ import MapKit
48 setNavigationTitle("Καταστήματα") 50 setNavigationTitle("Καταστήματα")
49 51
50 backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) 52 backgroundImage.image = UIImage(named: "coupons_scrollview_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
53 + phoneImageView.image = UIImage(named: "ic_phone", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
54 + addressImageView.image = UIImage(named: "ic_address", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
51 55
52 mapView.delegate = self 56 mapView.delegate = self
53 mapView.centerToLocation(initialLocation, regionRadius: 1000000) 57 mapView.centerToLocation(initialLocation, regionRadius: 1000000)
...@@ -56,25 +60,26 @@ import MapKit ...@@ -56,25 +60,26 @@ import MapKit
56 // mapView.layer.cornerRadius = 30 60 // mapView.layer.cornerRadius = 30
57 // mapView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius 61 // mapView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
58 62
59 - let image = UIImage(named: "top_border_line", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)! 63 +// let image = UIImage(named: "top_border_line", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)!
60 - var aspectR: CGFloat = 0.0 64 +// var aspectR: CGFloat = 0.0
61 - 65 +//
62 - aspectR = image.size.width/image.size.height 66 +// aspectR = image.size.width/image.size.height
63 -
64 - topBorderLine.translatesAutoresizingMaskIntoConstraints = false
65 - topBorderLine.image = image
66 - topBorderLine.contentMode = .scaleAspectFill
67 67
68 - NSLayoutConstraint.activate([ 68 +// topBorderLine.translatesAutoresizingMaskIntoConstraints = false
69 - topBorderLine.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0), 69 +// topBorderLine.image = image
70 - topBorderLine.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0), 70 +// topBorderLine.contentMode = .scaleAspectFill
71 - topBorderLine.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0), 71 +//
72 - topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), 72 +// NSLayoutConstraint.activate([
73 - topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) 73 +// topBorderLine.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0),
74 - ]) 74 +// topBorderLine.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0),
75 +// topBorderLine.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0),
76 +// topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width),
77 +// topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
78 +// ])
75 79
76 80
77 closeButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) 81 closeButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5)
82 + closeButton.setImage(UIImage(named: "ic_close_3", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
78 83
79 titleView.font = UIFont(name: "PFSquareSansPro-Bold", size: 19) 84 titleView.font = UIFont(name: "PFSquareSansPro-Bold", size: 19)
80 titleView.textColor = UIColor(rgb: 0x757575) 85 titleView.textColor = UIColor(rgb: 0x757575)
...@@ -94,13 +99,18 @@ import MapKit ...@@ -94,13 +99,18 @@ import MapKit
94 //directionsButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16) 99 //directionsButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16)
95 directionsButton.setTitle("Οδηγίες", for: .normal) 100 directionsButton.setTitle("Οδηγίες", for: .normal)
96 directionsButton.setImage(UIImage(named: "ic_directions", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) 101 directionsButton.setImage(UIImage(named: "ic_directions", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
97 - 102 +
103 +// directionsButton.sizeToFit()
104 + directionsButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 18)
105 + directionsButton.setTitleColor(.white, for: .normal)
106 + directionsButton.tintColor = .white
107 + directionsButton.backgroundColor = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00)
108 + directionsButton.layer.cornerRadius = 16.0
98 // directionsButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 5); 109 // directionsButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 5);
99 // directionsButton.titleEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0); 110 // directionsButton.titleEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0);
100 -// directionsButton.sizeToFit() 111 + directionsButton.frame = CGRect(x: 0.0, y: 0.0, width: directionsButton.intrinsicContentSize.width+10, height: 50)
101 - //directionsButton.setTitleColor(.white, for: .normal) 112 +// directionsButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 15, bottom: 0, right: 15)
102 - //directionsButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00) 113 + directionsButton.setInsets(forContentPadding: UIEdgeInsets(top: 0, left: 15, bottom: 0, right: 15), imageTitlePadding: 10)
103 - //directionsButton.layer.cornerRadius = 12.0
104 114
105 load() 115 load()
106 } 116 }
...@@ -149,16 +159,16 @@ import MapKit ...@@ -149,16 +159,16 @@ import MapKit
149 159
150 let filteredMerchants = (merchantsData ?? []).filter({ return (($0._latitude != 0.0) && ($0._longitude != 0.0)) }) 160 let filteredMerchants = (merchantsData ?? []).filter({ return (($0._latitude != 0.0) && ($0._longitude != 0.0)) })
151 161
152 - if (self.isMarket == true) { 162 +// if (self.isMarket == true) {
153 self.merchantsArray = filteredMerchants 163 self.merchantsArray = filteredMerchants
154 164
155 if let parent = (merchantsData ?? []).first(where: {(($0._latitude == 0.0) && ($0._longitude == 0.0))}) { 165 if let parent = (merchantsData ?? []).first(where: {(($0._latitude == 0.0) && ($0._longitude == 0.0))}) {
156 self.parentMerchant = parent 166 self.parentMerchant = parent
157 } 167 }
158 168
159 - } else { 169 +// } else {
160 - self.merchantsArray = merchantsData ?? [] 170 +// self.merchantsArray = merchantsData ?? []
161 - } 171 +// }
162 172
163 self.loadMapPins() 173 self.loadMapPins()
164 174
...@@ -318,7 +328,8 @@ import MapKit ...@@ -318,7 +328,8 @@ import MapKit
318 private func loadPinDetailsView(_ annotation: MerchantAnnotation) { 328 private func loadPinDetailsView(_ annotation: MerchantAnnotation) {
319 self.selectedMerchant = annotation.model 329 self.selectedMerchant = annotation.model
320 330
321 - self.titleView.text = self.selectedMerchant?._admin_name 331 +// self.titleView.text = self.selectedMerchant?._admin_name
332 + self.titleView.text = self.parentMerchant?._admin_name
322 333
323 if (self.isMarket == true) { 334 if (self.isMarket == true) {
324 self.nameImageView.load(link: self.parentMerchant?._img_preview ?? "", placeholder: UIImage(), cache: URLCache()) 335 self.nameImageView.load(link: self.parentMerchant?._img_preview ?? "", placeholder: UIImage(), cache: URLCache())
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
11 <objects> 11 <objects>
12 <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MapsViewController" customModule="SwiftWarplyFramework" customModuleProvider="target"> 12 <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MapsViewController" customModule="SwiftWarplyFramework" customModuleProvider="target">
13 <connections> 13 <connections>
14 + <outlet property="addressImageView" destination="Bic-c4-J9E" id="pOr-y5-qYi"/>
14 <outlet property="addressView" destination="syP-Hv-OGD" id="LUw-pI-3va"/> 15 <outlet property="addressView" destination="syP-Hv-OGD" id="LUw-pI-3va"/>
15 <outlet property="backgroundImage" destination="tVJ-fk-ani" id="ETq-VL-6q7"/> 16 <outlet property="backgroundImage" destination="tVJ-fk-ani" id="ETq-VL-6q7"/>
16 <outlet property="closeButton" destination="lEb-V2-2FC" id="aEd-fS-pbO"/> 17 <outlet property="closeButton" destination="lEb-V2-2FC" id="aEd-fS-pbO"/>
...@@ -21,6 +22,7 @@ ...@@ -21,6 +22,7 @@
21 <outlet property="mapView" destination="F1c-ck-cQa" id="cdx-31-BiL"/> 22 <outlet property="mapView" destination="F1c-ck-cQa" id="cdx-31-BiL"/>
22 <outlet property="nameImageView" destination="eDV-A1-pOO" id="JYq-eT-kEG"/> 23 <outlet property="nameImageView" destination="eDV-A1-pOO" id="JYq-eT-kEG"/>
23 <outlet property="nameView" destination="MsK-eg-pkk" id="60t-lm-O8m"/> 24 <outlet property="nameView" destination="MsK-eg-pkk" id="60t-lm-O8m"/>
25 + <outlet property="phoneImageView" destination="KhY-nt-uwH" id="1lt-DL-aRN"/>
24 <outlet property="phoneView" destination="knh-D9-CuM" id="ES2-6e-vRx"/> 26 <outlet property="phoneView" destination="knh-D9-CuM" id="ES2-6e-vRx"/>
25 <outlet property="titleView" destination="oVh-dv-f7a" id="dst-Ku-EFw"/> 27 <outlet property="titleView" destination="oVh-dv-f7a" id="dst-Ku-EFw"/>
26 <outlet property="topBorderLine" destination="Z8H-fT-Lo9" id="Vl0-Nb-YhC"/> 28 <outlet property="topBorderLine" destination="Z8H-fT-Lo9" id="Vl0-Nb-YhC"/>
...@@ -41,7 +43,7 @@ ...@@ -41,7 +43,7 @@
41 <mapView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" mapType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="F1c-ck-cQa"> 43 <mapView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" mapType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="F1c-ck-cQa">
42 <rect key="frame" x="0.0" y="0.0" width="414" height="848"/> 44 <rect key="frame" x="0.0" y="0.0" width="414" height="848"/>
43 </mapView> 45 </mapView>
44 - <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Z8H-fT-Lo9"> 46 + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Z8H-fT-Lo9">
45 <rect key="frame" x="0.0" y="420" width="414" height="11.5"/> 47 <rect key="frame" x="0.0" y="420" width="414" height="11.5"/>
46 </imageView> 48 </imageView>
47 </subviews> 49 </subviews>
...@@ -62,6 +64,7 @@ ...@@ -62,6 +64,7 @@
62 <variation key="default"> 64 <variation key="default">
63 <mask key="subviews"> 65 <mask key="subviews">
64 <exclude reference="tVJ-fk-ani"/> 66 <exclude reference="tVJ-fk-ani"/>
67 + <exclude reference="Z8H-fT-Lo9"/>
65 </mask> 68 </mask>
66 </variation> 69 </variation>
67 </view> 70 </view>
...@@ -69,7 +72,7 @@ ...@@ -69,7 +72,7 @@
69 <rect key="frame" x="0.0" y="576" width="414" height="320"/> 72 <rect key="frame" x="0.0" y="576" width="414" height="320"/>
70 <subviews> 73 <subviews>
71 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="INTERSPORT" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oVh-dv-f7a" userLabel="Title"> 74 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="INTERSPORT" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oVh-dv-f7a" userLabel="Title">
72 - <rect key="frame" x="30" y="20" width="294" height="30"/> 75 + <rect key="frame" x="30" y="20" width="304" height="30"/>
73 <constraints> 76 <constraints>
74 <constraint firstAttribute="height" constant="30" id="Gf2-VN-pNV"/> 77 <constraint firstAttribute="height" constant="30" id="Gf2-VN-pNV"/>
75 </constraints> 78 </constraints>
...@@ -78,7 +81,7 @@ ...@@ -78,7 +81,7 @@
78 <nil key="highlightedColor"/> 81 <nil key="highlightedColor"/>
79 </label> 82 </label>
80 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lEb-V2-2FC" userLabel="Close"> 83 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lEb-V2-2FC" userLabel="Close">
81 - <rect key="frame" x="344" y="20" width="40" height="40"/> 84 + <rect key="frame" x="354" y="15" width="40" height="40"/>
82 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 85 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
83 <constraints> 86 <constraints>
84 <constraint firstAttribute="width" constant="40" id="gnd-qn-qo5"/> 87 <constraint firstAttribute="width" constant="40" id="gnd-qn-qo5"/>
...@@ -93,74 +96,77 @@ ...@@ -93,74 +96,77 @@
93 </connections> 96 </connections>
94 </button> 97 </button>
95 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="F55-qj-PDc" userLabel="LineTop"> 98 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="F55-qj-PDc" userLabel="LineTop">
96 - <rect key="frame" x="10" y="40" width="394" height="1"/> 99 + <rect key="frame" x="10" y="61.5" width="394" height="1"/>
97 <constraints> 100 <constraints>
98 <constraint firstAttribute="height" constant="1" id="18a-J3-UZm"/> 101 <constraint firstAttribute="height" constant="1" id="18a-J3-UZm"/>
99 </constraints> 102 </constraints>
100 </view> 103 </view>
101 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="eDV-A1-pOO" userLabel="NameLogo"> 104 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="eDV-A1-pOO" userLabel="NameLogo">
102 - <rect key="frame" x="30" y="66" width="30" height="30"/> 105 + <rect key="frame" x="30" y="87.5" width="30" height="30"/>
103 <constraints> 106 <constraints>
104 <constraint firstAttribute="width" constant="30" id="IjG-Iw-fIq"/> 107 <constraint firstAttribute="width" constant="30" id="IjG-Iw-fIq"/>
105 <constraint firstAttribute="height" constant="30" id="LnS-gV-hIi"/> 108 <constraint firstAttribute="height" constant="30" id="LnS-gV-hIi"/>
106 </constraints> 109 </constraints>
107 </imageView> 110 </imageView>
108 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" text="Intersport Χαλανδρίου" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MsK-eg-pkk" userLabel="NameLabel"> 111 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" text="Intersport Χαλανδρίου" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MsK-eg-pkk" userLabel="NameLabel">
109 - <rect key="frame" x="70" y="60.5" width="314" height="21.5"/> 112 + <rect key="frame" x="70" y="82" width="314" height="21.5"/>
110 <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/> 113 <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/>
111 <nil key="textColor"/> 114 <nil key="textColor"/>
112 <nil key="highlightedColor"/> 115 <nil key="highlightedColor"/>
113 </label> 116 </label>
114 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SHs-vI-jD7" userLabel="LineMiddle"> 117 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SHs-vI-jD7" userLabel="LineMiddle">
115 - <rect key="frame" x="10" y="121" width="394" height="1"/> 118 + <rect key="frame" x="10" y="142.5" width="394" height="1"/>
116 <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 119 <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
117 <constraints> 120 <constraints>
118 <constraint firstAttribute="height" constant="1" id="hMo-qH-T2k"/> 121 <constraint firstAttribute="height" constant="1" id="hMo-qH-T2k"/>
119 </constraints> 122 </constraints>
120 </view> 123 </view>
121 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_phone" translatesAutoresizingMaskIntoConstraints="NO" id="KhY-nt-uwH" userLabel="phoneIcon"> 124 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_phone" translatesAutoresizingMaskIntoConstraints="NO" id="KhY-nt-uwH" userLabel="phoneIcon">
122 - <rect key="frame" x="30" y="152" width="20" height="20"/> 125 + <rect key="frame" x="30" y="173.5" width="20" height="20"/>
123 <constraints> 126 <constraints>
124 <constraint firstAttribute="height" constant="20" id="1rt-pN-Dld"/> 127 <constraint firstAttribute="height" constant="20" id="1rt-pN-Dld"/>
125 <constraint firstAttribute="width" constant="20" id="3Rd-ir-r7Q"/> 128 <constraint firstAttribute="width" constant="20" id="3Rd-ir-r7Q"/>
126 </constraints> 129 </constraints>
127 </imageView> 130 </imageView>
128 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" text="210-6230543" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="knh-D9-CuM" userLabel="phoneLabel"> 131 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" text="210-6230543" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="knh-D9-CuM" userLabel="phoneLabel">
129 - <rect key="frame" x="60" y="142" width="324" height="40"/> 132 + <rect key="frame" x="60" y="163.5" width="324" height="40"/>
130 <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/> 133 <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/>
131 <nil key="textColor"/> 134 <nil key="textColor"/>
132 <nil key="highlightedColor"/> 135 <nil key="highlightedColor"/>
133 </label> 136 </label>
134 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sAf-f8-8jc" userLabel="LineBottom"> 137 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sAf-f8-8jc" userLabel="LineBottom">
135 - <rect key="frame" x="10" y="202" width="394" height="1"/> 138 + <rect key="frame" x="10" y="223.5" width="394" height="1"/>
136 <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 139 <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
137 <constraints> 140 <constraints>
138 <constraint firstAttribute="height" constant="1" id="vSP-6I-Lz6"/> 141 <constraint firstAttribute="height" constant="1" id="vSP-6I-Lz6"/>
139 </constraints> 142 </constraints>
140 </view> 143 </view>
141 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_address" translatesAutoresizingMaskIntoConstraints="NO" id="Bic-c4-J9E" userLabel="AddressIcon"> 144 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_address" translatesAutoresizingMaskIntoConstraints="NO" id="Bic-c4-J9E" userLabel="AddressIcon">
142 - <rect key="frame" x="30" y="234.5" width="20" height="20"/> 145 + <rect key="frame" x="30" y="245.5" width="20" height="20"/>
143 <constraints> 146 <constraints>
144 <constraint firstAttribute="height" constant="20" id="A8o-MY-I6f"/> 147 <constraint firstAttribute="height" constant="20" id="A8o-MY-I6f"/>
145 <constraint firstAttribute="width" constant="20" id="Xma-bp-6IZ"/> 148 <constraint firstAttribute="width" constant="20" id="Xma-bp-6IZ"/>
146 </constraints> 149 </constraints>
147 </imageView> 150 </imageView>
148 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" text="ΕΘΝΙΚΗΣ ΑΝΤΙΣΤΑΣΕΩΣ 4 41" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="syP-Hv-OGD" userLabel="AddressLabel"> 151 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" text="ΕΘΝΙΚΗΣ ΑΝΤΙΣΤΑΣΕΩΣ 4 41" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="syP-Hv-OGD" userLabel="AddressLabel">
149 - <rect key="frame" x="60" y="223" width="239" height="43"/> 152 + <rect key="frame" x="60" y="244.5" width="246" height="21.5"/>
150 <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/> 153 <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/>
151 <nil key="textColor"/> 154 <nil key="textColor"/>
152 <nil key="highlightedColor"/> 155 <nil key="highlightedColor"/>
153 </label> 156 </label>
154 - <button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" horizontalCompressionResistancePriority="751" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bw3-J9-wHr" userLabel="Directions" customClass="CSMButton" customModule="SwiftWarplyFramework" customModuleProvider="target"> 157 + <button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" horizontalCompressionResistancePriority="751" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bw3-J9-wHr" userLabel="Directions">
155 - <rect key="frame" x="309" y="223" width="75" height="43"/> 158 + <rect key="frame" x="340" y="238.5" width="54" height="34"/>
159 + <constraints>
160 + <constraint firstAttribute="height" constant="34" id="9wg-ge-pC0"/>
161 + </constraints>
162 + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
156 <state key="normal" title="Button"/> 163 <state key="normal" title="Button"/>
157 - <buttonConfiguration key="configuration" style="plain" title="Button"/>
158 <connections> 164 <connections>
159 <action selector="directionsButtomAction:" destination="-1" eventType="touchUpInside" id="nMR-Jk-Wm4"/> 165 <action selector="directionsButtomAction:" destination="-1" eventType="touchUpInside" id="nMR-Jk-Wm4"/>
160 </connections> 166 </connections>
161 </button> 167 </button>
162 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" text="Δευτέρα - Τετάρτη" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="u9U-A7-lbO" userLabel="HoursLabel"> 168 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" text="Δευτέρα - Τετάρτη" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="u9U-A7-lbO" userLabel="HoursLabel">
163 - <rect key="frame" x="70" y="80.5" width="314" height="21.5"/> 169 + <rect key="frame" x="70" y="102" width="314" height="21.5"/>
164 <fontDescription key="fontDescription" type="system" pointSize="18"/> 170 <fontDescription key="fontDescription" type="system" pointSize="18"/>
165 <color key="textColor" systemColor="systemGray2Color"/> 171 <color key="textColor" systemColor="systemGray2Color"/>
166 <nil key="highlightedColor"/> 172 <nil key="highlightedColor"/>
...@@ -171,8 +177,6 @@ ...@@ -171,8 +177,6 @@
171 <constraints> 177 <constraints>
172 <constraint firstItem="u9U-A7-lbO" firstAttribute="leading" secondItem="eDV-A1-pOO" secondAttribute="trailing" constant="10" id="0Z2-uE-kRe"/> 178 <constraint firstItem="u9U-A7-lbO" firstAttribute="leading" secondItem="eDV-A1-pOO" secondAttribute="trailing" constant="10" id="0Z2-uE-kRe"/>
173 <constraint firstItem="XS2-AR-3j9" firstAttribute="trailing" secondItem="MsK-eg-pkk" secondAttribute="trailing" constant="30" id="1qW-i8-MRk"/> 179 <constraint firstItem="XS2-AR-3j9" firstAttribute="trailing" secondItem="MsK-eg-pkk" secondAttribute="trailing" constant="30" id="1qW-i8-MRk"/>
174 - <constraint firstItem="XS2-AR-3j9" firstAttribute="bottom" secondItem="bw3-J9-wHr" secondAttribute="bottom" constant="20" id="3vm-pn-qpa"/>
175 - <constraint firstItem="lEb-V2-2FC" firstAttribute="top" secondItem="Zc1-ew-qcl" secondAttribute="top" constant="20" id="5bY-RU-ons"/>
176 <constraint firstItem="knh-D9-CuM" firstAttribute="top" secondItem="SHs-vI-jD7" secondAttribute="bottom" constant="20" id="61g-5C-XbI"/> 180 <constraint firstItem="knh-D9-CuM" firstAttribute="top" secondItem="SHs-vI-jD7" secondAttribute="bottom" constant="20" id="61g-5C-XbI"/>
177 <constraint firstItem="sAf-f8-8jc" firstAttribute="leading" secondItem="XS2-AR-3j9" secondAttribute="leading" constant="10" id="7W6-cn-WdZ"/> 181 <constraint firstItem="sAf-f8-8jc" firstAttribute="leading" secondItem="XS2-AR-3j9" secondAttribute="leading" constant="10" id="7W6-cn-WdZ"/>
178 <constraint firstItem="bw3-J9-wHr" firstAttribute="centerY" secondItem="Bic-c4-J9E" secondAttribute="centerY" id="AHw-0D-gur"/> 182 <constraint firstItem="bw3-J9-wHr" firstAttribute="centerY" secondItem="Bic-c4-J9E" secondAttribute="centerY" id="AHw-0D-gur"/>
...@@ -180,12 +184,12 @@ ...@@ -180,12 +184,12 @@
180 <constraint firstItem="KhY-nt-uwH" firstAttribute="leading" secondItem="XS2-AR-3j9" secondAttribute="leading" constant="30" id="Dok-gZ-xf1"/> 184 <constraint firstItem="KhY-nt-uwH" firstAttribute="leading" secondItem="XS2-AR-3j9" secondAttribute="leading" constant="30" id="Dok-gZ-xf1"/>
181 <constraint firstItem="SHs-vI-jD7" firstAttribute="leading" secondItem="Zc1-ew-qcl" secondAttribute="leading" constant="10" id="Lj8-XN-HTj"/> 185 <constraint firstItem="SHs-vI-jD7" firstAttribute="leading" secondItem="Zc1-ew-qcl" secondAttribute="leading" constant="10" id="Lj8-XN-HTj"/>
182 <constraint firstAttribute="trailing" secondItem="F55-qj-PDc" secondAttribute="trailing" constant="10" id="MCj-ek-cnb"/> 186 <constraint firstAttribute="trailing" secondItem="F55-qj-PDc" secondAttribute="trailing" constant="10" id="MCj-ek-cnb"/>
183 - <constraint firstAttribute="trailing" secondItem="lEb-V2-2FC" secondAttribute="trailing" constant="30" id="NcX-rr-7OU"/> 187 + <constraint firstAttribute="trailing" secondItem="lEb-V2-2FC" secondAttribute="trailing" constant="20" id="NcX-rr-7OU"/>
184 <constraint firstItem="syP-Hv-OGD" firstAttribute="leading" secondItem="Bic-c4-J9E" secondAttribute="trailing" constant="10" id="Rl4-cn-VTG"/> 188 <constraint firstItem="syP-Hv-OGD" firstAttribute="leading" secondItem="Bic-c4-J9E" secondAttribute="trailing" constant="10" id="Rl4-cn-VTG"/>
185 <constraint firstAttribute="trailing" secondItem="SHs-vI-jD7" secondAttribute="trailing" constant="10" id="Smw-Bv-Qlr"/> 189 <constraint firstAttribute="trailing" secondItem="SHs-vI-jD7" secondAttribute="trailing" constant="10" id="Smw-Bv-Qlr"/>
186 <constraint firstItem="lEb-V2-2FC" firstAttribute="leading" secondItem="oVh-dv-f7a" secondAttribute="trailing" constant="20" id="ULP-b9-ToV"/> 190 <constraint firstItem="lEb-V2-2FC" firstAttribute="leading" secondItem="oVh-dv-f7a" secondAttribute="trailing" constant="20" id="ULP-b9-ToV"/>
191 + <constraint firstItem="bw3-J9-wHr" firstAttribute="centerY" secondItem="syP-Hv-OGD" secondAttribute="centerY" id="VMT-7b-JjS"/>
187 <constraint firstItem="MsK-eg-pkk" firstAttribute="leading" secondItem="eDV-A1-pOO" secondAttribute="trailing" constant="10" id="Vg7-xl-oA2"/> 192 <constraint firstItem="MsK-eg-pkk" firstAttribute="leading" secondItem="eDV-A1-pOO" secondAttribute="trailing" constant="10" id="Vg7-xl-oA2"/>
188 - <constraint firstItem="bw3-J9-wHr" firstAttribute="top" secondItem="sAf-f8-8jc" secondAttribute="bottom" constant="20" id="YhG-Th-URU"/>
189 <constraint firstItem="oVh-dv-f7a" firstAttribute="leading" secondItem="Zc1-ew-qcl" secondAttribute="leading" constant="30" id="Zd1-SB-SlA"/> 193 <constraint firstItem="oVh-dv-f7a" firstAttribute="leading" secondItem="Zc1-ew-qcl" secondAttribute="leading" constant="30" id="Zd1-SB-SlA"/>
190 <constraint firstItem="KhY-nt-uwH" firstAttribute="top" secondItem="SHs-vI-jD7" secondAttribute="bottom" constant="30" id="a6s-J0-5rJ"/> 194 <constraint firstItem="KhY-nt-uwH" firstAttribute="top" secondItem="SHs-vI-jD7" secondAttribute="bottom" constant="30" id="a6s-J0-5rJ"/>
191 <constraint firstItem="knh-D9-CuM" firstAttribute="leading" secondItem="KhY-nt-uwH" secondAttribute="trailing" constant="10" id="aeR-MK-4WB"/> 195 <constraint firstItem="knh-D9-CuM" firstAttribute="leading" secondItem="KhY-nt-uwH" secondAttribute="trailing" constant="10" id="aeR-MK-4WB"/>
...@@ -196,9 +200,10 @@ ...@@ -196,9 +200,10 @@
196 <constraint firstItem="XS2-AR-3j9" firstAttribute="trailing" secondItem="u9U-A7-lbO" secondAttribute="trailing" constant="30" id="hZz-zi-NzM"/> 200 <constraint firstItem="XS2-AR-3j9" firstAttribute="trailing" secondItem="u9U-A7-lbO" secondAttribute="trailing" constant="30" id="hZz-zi-NzM"/>
197 <constraint firstItem="XS2-AR-3j9" firstAttribute="trailing" secondItem="sAf-f8-8jc" secondAttribute="trailing" constant="10" id="hn5-U5-rvW"/> 201 <constraint firstItem="XS2-AR-3j9" firstAttribute="trailing" secondItem="sAf-f8-8jc" secondAttribute="trailing" constant="10" id="hn5-U5-rvW"/>
198 <constraint firstItem="sAf-f8-8jc" firstAttribute="top" secondItem="SHs-vI-jD7" secondAttribute="bottom" constant="80" id="htI-gJ-mSm"/> 202 <constraint firstItem="sAf-f8-8jc" firstAttribute="top" secondItem="SHs-vI-jD7" secondAttribute="bottom" constant="80" id="htI-gJ-mSm"/>
199 - <constraint firstAttribute="trailing" secondItem="bw3-J9-wHr" secondAttribute="trailing" constant="30" id="hya-Ns-ldi"/> 203 + <constraint firstAttribute="trailing" secondItem="bw3-J9-wHr" secondAttribute="trailing" constant="20" id="hya-Ns-ldi"/>
200 <constraint firstItem="Bic-c4-J9E" firstAttribute="leading" secondItem="Zc1-ew-qcl" secondAttribute="leading" constant="30" id="iUf-BZ-0kl"/> 204 <constraint firstItem="Bic-c4-J9E" firstAttribute="leading" secondItem="Zc1-ew-qcl" secondAttribute="leading" constant="30" id="iUf-BZ-0kl"/>
201 <constraint firstItem="F55-qj-PDc" firstAttribute="leading" secondItem="Zc1-ew-qcl" secondAttribute="leading" constant="10" id="jK6-2e-p3v"/> 205 <constraint firstItem="F55-qj-PDc" firstAttribute="leading" secondItem="Zc1-ew-qcl" secondAttribute="leading" constant="10" id="jK6-2e-p3v"/>
206 + <constraint firstItem="lEb-V2-2FC" firstAttribute="centerY" secondItem="oVh-dv-f7a" secondAttribute="centerY" id="lnJ-gm-ewM"/>
202 <constraint firstItem="XS2-AR-3j9" firstAttribute="bottom" secondItem="syP-Hv-OGD" secondAttribute="bottom" constant="20" id="luv-Gm-76K"/> 207 <constraint firstItem="XS2-AR-3j9" firstAttribute="bottom" secondItem="syP-Hv-OGD" secondAttribute="bottom" constant="20" id="luv-Gm-76K"/>
203 <constraint firstItem="sAf-f8-8jc" firstAttribute="top" secondItem="knh-D9-CuM" secondAttribute="bottom" constant="20" id="m6I-QE-hbq"/> 208 <constraint firstItem="sAf-f8-8jc" firstAttribute="top" secondItem="knh-D9-CuM" secondAttribute="bottom" constant="20" id="m6I-QE-hbq"/>
204 <constraint firstItem="eDV-A1-pOO" firstAttribute="top" secondItem="F55-qj-PDc" secondAttribute="bottom" constant="25" id="nAA-6u-CUo"/> 209 <constraint firstItem="eDV-A1-pOO" firstAttribute="top" secondItem="F55-qj-PDc" secondAttribute="bottom" constant="25" id="nAA-6u-CUo"/>
...@@ -206,7 +211,7 @@ ...@@ -206,7 +211,7 @@
206 <constraint firstItem="MsK-eg-pkk" firstAttribute="centerY" secondItem="eDV-A1-pOO" secondAttribute="centerY" constant="-10" id="wpA-Xv-RdU"/> 211 <constraint firstItem="MsK-eg-pkk" firstAttribute="centerY" secondItem="eDV-A1-pOO" secondAttribute="centerY" constant="-10" id="wpA-Xv-RdU"/>
207 <constraint firstItem="syP-Hv-OGD" firstAttribute="top" secondItem="sAf-f8-8jc" secondAttribute="bottom" constant="20" id="xD6-zI-9Nl"/> 212 <constraint firstItem="syP-Hv-OGD" firstAttribute="top" secondItem="sAf-f8-8jc" secondAttribute="bottom" constant="20" id="xD6-zI-9Nl"/>
208 <constraint firstItem="SHs-vI-jD7" firstAttribute="top" secondItem="F55-qj-PDc" secondAttribute="bottom" constant="80" id="xPl-UV-cMd"/> 213 <constraint firstItem="SHs-vI-jD7" firstAttribute="top" secondItem="F55-qj-PDc" secondAttribute="bottom" constant="80" id="xPl-UV-cMd"/>
209 - <constraint firstItem="bw3-J9-wHr" firstAttribute="leading" secondItem="syP-Hv-OGD" secondAttribute="trailing" constant="10" id="zAU-89-R2t"/> 214 + <constraint firstItem="bw3-J9-wHr" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="syP-Hv-OGD" secondAttribute="trailing" constant="10" id="zAU-89-R2t"/>
210 </constraints> 215 </constraints>
211 </view> 216 </view>
212 </subviews> 217 </subviews>
......
...@@ -607,3 +607,23 @@ extension UIView { ...@@ -607,3 +607,23 @@ extension UIView {
607 layer.mask = shape 607 layer.mask = shape
608 } 608 }
609 } 609 }
610 +
611 +extension UIButton {
612 + func setInsets(
613 + forContentPadding contentPadding: UIEdgeInsets,
614 + imageTitlePadding: CGFloat
615 + ) {
616 + self.contentEdgeInsets = UIEdgeInsets(
617 + top: contentPadding.top,
618 + left: contentPadding.left,
619 + bottom: contentPadding.bottom,
620 + right: contentPadding.right + imageTitlePadding
621 + )
622 + self.titleEdgeInsets = UIEdgeInsets(
623 + top: 0,
624 + left: imageTitlePadding,
625 + bottom: 0,
626 + right: -imageTitlePadding
627 + )
628 + }
629 +}
......