@complexify/expo-mapbox-navigation 1.2.2 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,43 +4,28 @@ import MapboxNavigationUIKit
|
|
4
4
|
import UIKit
|
5
5
|
|
6
6
|
class CustomDayStyle: StandardDayStyle {
|
7
|
-
// Speed Limit View
|
8
7
|
var customSpeedLimitTextColor: UIColor?
|
9
8
|
var customSpeedLimitBackgroundColor: UIColor?
|
10
9
|
var customSpeedLimitBorderColor: UIColor?
|
11
|
-
|
12
|
-
// Bottom Banner
|
13
10
|
var customBottomBannerBackgroundColor: UIColor?
|
14
11
|
var customBottomBannerTimeRemainingTextColor: UIColor?
|
15
12
|
var customBottomBannerDistanceRemainingTextColor: UIColor?
|
16
13
|
var customBottomBannerArrivalTimeTextColor: UIColor?
|
17
|
-
|
18
|
-
// Way Name View
|
19
14
|
var customWayNameBackgroundColor: UIColor?
|
20
|
-
var customWayNameTextColor: UIColor?
|
21
|
-
|
22
|
-
// Top Banner
|
23
15
|
var customTopBannerBackgroundColor: UIColor?
|
24
16
|
var customTopBannerPrimaryTextColor: UIColor?
|
25
17
|
var customTopBannerSecondaryTextColor: UIColor?
|
26
18
|
var customTopBannerDistanceTextColor: UIColor?
|
27
|
-
var customTopBannerSeparatorColor: UIColor?
|
28
|
-
|
29
|
-
// Resume Button
|
30
19
|
var customResumeButtonBackgroundColor: UIColor?
|
31
20
|
var customResumeButtonTextColor: UIColor?
|
32
21
|
var customResumeButtonBorderColor: UIColor?
|
33
|
-
|
34
|
-
// Floating Buttons
|
35
22
|
var customFloatingButtonsBackgroundColor: UIColor?
|
36
23
|
var customFloatingButtonsBorderColor: UIColor?
|
37
24
|
var customFloatingButtonsTextColor: UIColor?
|
38
25
|
|
39
|
-
//
|
40
|
-
var
|
41
|
-
var
|
42
|
-
var customManeuverViewPrimaryColorHighlighted: UIColor?
|
43
|
-
var customManeuverViewSecondaryColorHighlighted: UIColor?
|
26
|
+
// Information Stack (2)
|
27
|
+
var customInformationStackBackgroundColor: UIColor?
|
28
|
+
var customInformationStackTextColor: UIColor?
|
44
29
|
|
45
30
|
// Steps List
|
46
31
|
var customStepsBackgroundColor: UIColor?
|
@@ -65,104 +50,36 @@ class CustomDayStyle: StandardDayStyle {
|
|
65
50
|
var customProgressBarProgressColor: UIColor?
|
66
51
|
var customProgressBarBackgroundColor: UIColor?
|
67
52
|
|
53
|
+
// Maneuver View
|
54
|
+
var customManeuverViewPrimaryColor: UIColor?
|
55
|
+
var customManeuverViewSecondaryColor: UIColor?
|
56
|
+
var customManeuverViewPrimaryColorHighlighted: UIColor?
|
57
|
+
var customManeuverViewSecondaryColorHighlighted: UIColor?
|
58
|
+
|
59
|
+
// Instructions Card
|
60
|
+
var customInstructionsCardBackgroundColor: UIColor?
|
61
|
+
var customInstructionsCardSeparatorColor: UIColor?
|
62
|
+
var customInstructionsCardHighlightedSeparatorColor: UIColor?
|
63
|
+
|
68
64
|
// Exit View
|
69
65
|
var customExitViewForegroundColor: UIColor?
|
70
66
|
var customExitViewBorderColor: UIColor?
|
71
67
|
var customExitViewHighlightColor: UIColor?
|
72
|
-
|
68
|
+
|
73
69
|
// Route Shield
|
74
70
|
var customRouteShieldForegroundColor: UIColor?
|
75
71
|
var customRouteShieldBorderColor: UIColor?
|
76
72
|
var customRouteShieldHighlightColor: UIColor?
|
77
|
-
|
73
|
+
|
78
74
|
// Distance Labels
|
79
75
|
var customDistanceRemainingColor: UIColor?
|
80
76
|
var customDistanceUnitColor: UIColor?
|
81
77
|
var customDistanceValueColor: UIColor?
|
82
|
-
|
83
|
-
// Navigation Map
|
84
|
-
var customRouteAlternateColor: UIColor?
|
85
|
-
var customRouteAnnotationSelectedColor: UIColor?
|
86
|
-
var customRouteAnnotationColor: UIColor?
|
87
|
-
var customRouteAnnotationTextColor: UIColor?
|
88
|
-
var customRouteAnnotationSelectedTextColor: UIColor?
|
89
|
-
var customRouteAnnotationMoreTimeTextColor: UIColor?
|
90
|
-
var customRouteAnnotationLessTimeTextColor: UIColor?
|
91
|
-
var customWaypointColor: UIColor?
|
92
|
-
var customWaypointStrokeColor: UIColor?
|
93
|
-
|
94
|
-
// Instructions Card
|
95
|
-
var customInstructionsCardBackgroundColor: UIColor?
|
96
|
-
var customInstructionsCardSeparatorColor: UIColor?
|
97
|
-
var customInstructionsCardHighlightedSeparatorColor: UIColor?
|
98
|
-
|
99
|
-
// Feedback
|
100
|
-
var customFeedbackBackgroundColor: UIColor?
|
101
|
-
var customFeedbackTextColor: UIColor?
|
102
|
-
var customFeedbackCellColor: UIColor?
|
103
|
-
var customFeedbackSubtypeCircleColor: UIColor?
|
104
|
-
var customFeedbackSubtypeCircleOutlineColor: UIColor?
|
105
|
-
|
106
|
-
// End of Route
|
107
|
-
var customEndOfRouteButtonTextColor: UIColor?
|
108
|
-
var customEndOfRouteCommentBackgroundColor: UIColor?
|
109
|
-
var customEndOfRouteCommentTextColor: UIColor?
|
110
|
-
var customEndOfRouteContentBackgroundColor: UIColor?
|
111
|
-
var customEndOfRouteTitleTextColor: UIColor?
|
112
|
-
|
113
|
-
// Road Shield Colors
|
114
|
-
var customRoadShieldBlackColor: UIColor?
|
115
|
-
var customRoadShieldBlueColor: UIColor?
|
116
|
-
var customRoadShieldGreenColor: UIColor?
|
117
|
-
var customRoadShieldRedColor: UIColor?
|
118
|
-
var customRoadShieldWhiteColor: UIColor?
|
119
|
-
var customRoadShieldYellowColor: UIColor?
|
120
|
-
var customRoadShieldDefaultColor: UIColor?
|
121
|
-
|
122
|
-
// Button Properties
|
123
|
-
var customButtonTextColor: UIColor?
|
124
|
-
var customCancelButtonTintColor: UIColor?
|
125
|
-
var customPreviewButtonTintColor: UIColor?
|
126
|
-
var customStartButtonTintColor: UIColor?
|
127
|
-
var customDismissButtonBackgroundColor: UIColor?
|
128
|
-
var customDismissButtonTextColor: UIColor?
|
129
|
-
var customBackButtonBackgroundColor: UIColor?
|
130
|
-
var customBackButtonTintColor: UIColor?
|
131
|
-
var customBackButtonTextColor: UIColor?
|
132
|
-
var customBackButtonBorderColor: UIColor?
|
133
|
-
|
134
|
-
// Navigation View
|
135
|
-
var customNavigationViewBackgroundColor: UIColor?
|
136
|
-
|
137
|
-
// Distance Label Properties
|
138
|
-
var customDistanceLabelUnitTextColor: UIColor?
|
139
|
-
var customDistanceLabelValueTextColor: UIColor?
|
140
|
-
|
78
|
+
|
141
79
|
// Rating Control
|
142
80
|
var customRatingControlNormalColor: UIColor?
|
143
81
|
var customRatingControlSelectedColor: UIColor?
|
144
|
-
|
145
|
-
// Steps Properties
|
146
|
-
var customStepsBackgroundViewColor: UIColor?
|
147
|
-
var customStepsTableHeaderTintColor: UIColor?
|
148
|
-
var customStepsTableHeaderTextColor: UIColor?
|
149
|
-
var customStepInstructionsBackgroundColor: UIColor?
|
150
|
-
var customStepTableViewCellBackgroundColor: UIColor?
|
151
|
-
|
152
|
-
// Next Instruction
|
153
|
-
var customNextInstructionNormalTextColor: UIColor?
|
154
|
-
var customNextInstructionContainedTextColor: UIColor?
|
155
|
-
|
156
|
-
// Secondary Label Properties
|
157
|
-
var customSecondaryLabelNormalTextColor: UIColor?
|
158
|
-
var customSecondaryLabelFont: UIFont?
|
159
|
-
|
160
|
-
// Stylable Label
|
161
|
-
var customStylableLabelNormalTextColor: UIColor?
|
162
|
-
|
163
|
-
// CarPlay Properties
|
164
|
-
var customCarPlayCompassBackgroundColor: UIColor?
|
165
|
-
|
82
|
+
|
166
83
|
required init() {
|
167
84
|
super.init()
|
168
85
|
styleType = .day
|
@@ -173,7 +90,7 @@ class CustomDayStyle: StandardDayStyle {
|
|
173
90
|
|
174
91
|
let traitCollection = UIScreen.main.traitCollection
|
175
92
|
|
176
|
-
// Speed
|
93
|
+
// Speed limit customization
|
177
94
|
if let textColor = customSpeedLimitTextColor {
|
178
95
|
SpeedLimitView.appearance(for: traitCollection).textColor = textColor
|
179
96
|
}
|
@@ -184,10 +101,12 @@ class CustomDayStyle: StandardDayStyle {
|
|
184
101
|
SpeedLimitView.appearance(for: traitCollection).regulatoryBorderColor = borderColor
|
185
102
|
}
|
186
103
|
|
187
|
-
// Bottom
|
104
|
+
// Bottom banner customization
|
188
105
|
if let bottomBannerBg = customBottomBannerBackgroundColor {
|
189
106
|
BottomBannerView.appearance(for: traitCollection).backgroundColor = bottomBannerBg
|
190
107
|
}
|
108
|
+
|
109
|
+
// Bottom banner text colors
|
191
110
|
if let timeRemainingColor = customBottomBannerTimeRemainingTextColor {
|
192
111
|
TimeRemainingLabel.appearance(for: traitCollection).textColor = timeRemainingColor
|
193
112
|
}
|
@@ -198,15 +117,12 @@ class CustomDayStyle: StandardDayStyle {
|
|
198
117
|
ArrivalTimeLabel.appearance(for: traitCollection).textColor = arrivalTimeColor
|
199
118
|
}
|
200
119
|
|
201
|
-
// Way
|
120
|
+
// Way name customization
|
202
121
|
if let bgColor = customWayNameBackgroundColor {
|
203
|
-
|
204
|
-
}
|
205
|
-
if let textColor = customWayNameTextColor {
|
206
|
-
WayNameLabel.appearance(for: traitCollection).textColor = textColor
|
122
|
+
WayNameView.appearance(for: traitCollection).backgroundColor = bgColor.withAlphaComponent(0.8)
|
207
123
|
}
|
208
124
|
|
209
|
-
// Top
|
125
|
+
// Top banner customization
|
210
126
|
if let topBannerBg = customTopBannerBackgroundColor {
|
211
127
|
InstructionsBannerView.appearance(for: traitCollection).backgroundColor = topBannerBg
|
212
128
|
}
|
@@ -219,11 +135,8 @@ class CustomDayStyle: StandardDayStyle {
|
|
219
135
|
if let distanceTextColor = customTopBannerDistanceTextColor {
|
220
136
|
DistanceLabel.appearance(for: traitCollection).textColor = distanceTextColor
|
221
137
|
}
|
222
|
-
if let separatorColor = customTopBannerSeparatorColor {
|
223
|
-
SeparatorView.appearance(for: traitCollection).backgroundColor = separatorColor
|
224
|
-
}
|
225
138
|
|
226
|
-
// Resume
|
139
|
+
// Resume button customization
|
227
140
|
if let resumeBgColor = customResumeButtonBackgroundColor {
|
228
141
|
ResumeButton.appearance(for: traitCollection).backgroundColor = resumeBgColor
|
229
142
|
}
|
@@ -233,10 +146,12 @@ class CustomDayStyle: StandardDayStyle {
|
|
233
146
|
if let resumeBorderColor = customResumeButtonBorderColor {
|
234
147
|
ResumeButton.appearance(for: traitCollection).borderColor = resumeBorderColor
|
235
148
|
}
|
149
|
+
|
150
|
+
// Set default values for border width and corner radius
|
236
151
|
ResumeButton.appearance(for: traitCollection).borderWidth = 1.0
|
237
152
|
ResumeButton.appearance(for: traitCollection).cornerRadius = 4.0
|
238
153
|
|
239
|
-
// Floating
|
154
|
+
// Floating buttons customization
|
240
155
|
if let floatingBgColor = customFloatingButtonsBackgroundColor {
|
241
156
|
FloatingButton.appearance(for: traitCollection).backgroundColor = floatingBgColor
|
242
157
|
}
|
@@ -246,43 +161,52 @@ class CustomDayStyle: StandardDayStyle {
|
|
246
161
|
if let floatingBorderColor = customFloatingButtonsBorderColor {
|
247
162
|
FloatingButton.appearance(for: traitCollection).borderColor = floatingBorderColor
|
248
163
|
}
|
164
|
+
|
165
|
+
// Set default values for floating buttons
|
249
166
|
FloatingButton.appearance(for: traitCollection).borderWidth = 1.0
|
250
167
|
FloatingButton.appearance(for: traitCollection).cornerRadius = 4.0
|
251
168
|
|
252
|
-
//
|
253
|
-
if let
|
254
|
-
|
255
|
-
}
|
256
|
-
if let secondaryColor = customManeuverViewSecondaryColor {
|
257
|
-
ManeuverView.appearance(for: traitCollection).secondaryColor = secondaryColor
|
258
|
-
}
|
259
|
-
if let primaryHighlightedColor = customManeuverViewPrimaryColorHighlighted {
|
260
|
-
ManeuverView.appearance(for: traitCollection).primaryColorHighlighted = primaryHighlightedColor
|
169
|
+
// Information Stack
|
170
|
+
if let bgColor = customInformationStackBackgroundColor {
|
171
|
+
StepsBackgroundView.appearance(for: traitCollection).backgroundColor = bgColor
|
261
172
|
}
|
262
|
-
if let
|
263
|
-
|
173
|
+
if let textColor = customInformationStackTextColor {
|
174
|
+
StepsTableHeaderView.appearance(for: traitCollection).normalTextColor = textColor
|
264
175
|
}
|
265
176
|
|
266
177
|
// Steps List
|
267
178
|
if let bgColor = customStepsBackgroundColor {
|
268
|
-
|
179
|
+
StepInstructionsView.appearance(for: traitCollection).backgroundColor = bgColor
|
269
180
|
}
|
270
181
|
if let primaryTextColor = customStepsPrimaryTextColor {
|
271
|
-
|
182
|
+
PrimaryLabel.appearance(for: traitCollection, whenContainedInInstancesOf: [StepInstructionsView.self])
|
183
|
+
.normalTextColor = primaryTextColor
|
272
184
|
}
|
273
185
|
if let secondaryTextColor = customStepsSecondaryTextColor {
|
274
|
-
|
186
|
+
SecondaryLabel.appearance(for: traitCollection, whenContainedInInstancesOf: [StepInstructionsView.self])
|
187
|
+
.normalTextColor = secondaryTextColor
|
188
|
+
}
|
189
|
+
if let maneuverPrimaryColor = customStepsManeuverViewPrimaryColor {
|
190
|
+
ManeuverView.appearance(for: traitCollection, whenContainedInInstancesOf: [StepInstructionsView.self])
|
191
|
+
.primaryColor = maneuverPrimaryColor
|
192
|
+
}
|
193
|
+
if let maneuverSecondaryColor = customStepsManeuverViewSecondaryColor {
|
194
|
+
ManeuverView.appearance(for: traitCollection, whenContainedInInstancesOf: [StepInstructionsView.self])
|
195
|
+
.secondaryColor = maneuverSecondaryColor
|
196
|
+
}
|
197
|
+
if let separatorColor = customStepsSeparatorColor {
|
198
|
+
SeparatorView.appearance(for: traitCollection).backgroundColor = separatorColor
|
275
199
|
}
|
276
200
|
|
277
201
|
// Lane View
|
278
202
|
if let bgColor = customLaneViewBackgroundColor {
|
279
|
-
|
203
|
+
LanesView.appearance(for: traitCollection).backgroundColor = bgColor
|
280
204
|
}
|
281
205
|
if let fgColor = customLaneViewForegroundColor {
|
282
206
|
LaneView.appearance(for: traitCollection).primaryColor = fgColor
|
283
207
|
}
|
284
208
|
if let separatorColor = customLaneViewSeparatorColor {
|
285
|
-
|
209
|
+
// Apply to lane view separators if available
|
286
210
|
}
|
287
211
|
|
288
212
|
// Next Banner View
|
@@ -290,247 +214,89 @@ class CustomDayStyle: StandardDayStyle {
|
|
290
214
|
NextBannerView.appearance(for: traitCollection).backgroundColor = bgColor
|
291
215
|
}
|
292
216
|
if let primaryTextColor = customNextBannerPrimaryTextColor {
|
293
|
-
|
217
|
+
NextInstructionLabel.appearance(for: traitCollection, whenContainedInInstancesOf: [NextBannerView.self])
|
218
|
+
.normalTextColor = primaryTextColor
|
294
219
|
}
|
295
220
|
if let secondaryTextColor = customNextBannerSecondaryTextColor {
|
296
|
-
|
221
|
+
// Apply to secondary text in next banner
|
297
222
|
}
|
298
223
|
if let distanceTextColor = customNextBannerDistanceTextColor {
|
299
|
-
|
224
|
+
DistanceLabel.appearance(for: traitCollection, whenContainedInInstancesOf: [NextBannerView.self])
|
225
|
+
.valueTextColor = distanceTextColor
|
300
226
|
}
|
301
227
|
|
302
228
|
// Progress Bar
|
303
229
|
if let progressColor = customProgressBarProgressColor {
|
304
|
-
|
305
|
-
}
|
306
|
-
if let backgroundColor = customProgressBarBackgroundColor {
|
307
|
-
RouteProgressView.appearance(for: traitCollection).backgroundColor = backgroundColor
|
308
|
-
}
|
309
|
-
|
310
|
-
// Exit View
|
311
|
-
if let foregroundColor = customExitViewForegroundColor {
|
312
|
-
ExitView.appearance(for: traitCollection).foregroundColor = foregroundColor
|
230
|
+
// Apply to progress bar progress color
|
313
231
|
}
|
314
|
-
if let
|
315
|
-
|
316
|
-
}
|
317
|
-
if let highlightColor = customExitViewHighlightColor {
|
318
|
-
ExitView.appearance(for: traitCollection).highlightColor = highlightColor
|
232
|
+
if let bgColor = customProgressBarBackgroundColor {
|
233
|
+
// Apply to progress bar background
|
319
234
|
}
|
320
|
-
|
321
|
-
//
|
322
|
-
if let
|
323
|
-
|
235
|
+
|
236
|
+
// Maneuver View
|
237
|
+
if let primaryColor = customManeuverViewPrimaryColor {
|
238
|
+
ManeuverView.appearance(for: traitCollection).primaryColor = primaryColor
|
324
239
|
}
|
325
|
-
if let
|
326
|
-
|
240
|
+
if let secondaryColor = customManeuverViewSecondaryColor {
|
241
|
+
ManeuverView.appearance(for: traitCollection).secondaryColor = secondaryColor
|
327
242
|
}
|
328
|
-
if let
|
329
|
-
|
243
|
+
if let primaryHighlightedColor = customManeuverViewPrimaryColorHighlighted {
|
244
|
+
ManeuverView.appearance(for: traitCollection).primaryColorHighlighted = primaryHighlightedColor
|
330
245
|
}
|
331
|
-
|
332
|
-
|
333
|
-
if let distanceColor = customDistanceRemainingColor {
|
334
|
-
DistanceRemainingLabel.appearance(for: traitCollection).normalTextColor = distanceColor
|
246
|
+
if let secondaryHighlightedColor = customManeuverViewSecondaryColorHighlighted {
|
247
|
+
ManeuverView.appearance(for: traitCollection).secondaryColorHighlighted = secondaryHighlightedColor
|
335
248
|
}
|
336
|
-
|
249
|
+
|
337
250
|
// Instructions Card
|
338
251
|
if let bgColor = customInstructionsCardBackgroundColor {
|
339
|
-
InstructionsCardContainerView.appearance(
|
340
|
-
for: traitCollection,
|
341
|
-
whenContainedInInstancesOf: [InstructionsCardCell.self]
|
342
|
-
).customBackgroundColor = bgColor
|
252
|
+
InstructionsCardContainerView.appearance(for: traitCollection).customBackgroundColor = bgColor
|
343
253
|
}
|
344
254
|
if let separatorColor = customInstructionsCardSeparatorColor {
|
345
|
-
InstructionsCardContainerView.appearance(
|
346
|
-
for: traitCollection,
|
347
|
-
whenContainedInInstancesOf: [InstructionsCardCell.self]
|
348
|
-
).separatorColor = separatorColor
|
255
|
+
InstructionsCardContainerView.appearance(for: traitCollection).separatorColor = separatorColor
|
349
256
|
}
|
350
257
|
if let highlightedSeparatorColor = customInstructionsCardHighlightedSeparatorColor {
|
351
|
-
InstructionsCardContainerView.appearance(
|
352
|
-
for: traitCollection,
|
353
|
-
whenContainedInInstancesOf: [InstructionsCardCell.self]
|
354
|
-
).highlightedSeparatorColor = highlightedSeparatorColor
|
355
|
-
}
|
356
|
-
|
357
|
-
// Feedback
|
358
|
-
if let feedbackBgColor = customFeedbackBackgroundColor {
|
359
|
-
FeedbackStyleView.appearance(for: traitCollection).backgroundColor = feedbackBgColor
|
360
|
-
FeedbackCollectionView.appearance(for: traitCollection).backgroundColor = feedbackBgColor
|
361
|
-
}
|
362
|
-
if let feedbackTextColor = customFeedbackTextColor {
|
363
|
-
UILabel.appearance(
|
364
|
-
for: traitCollection,
|
365
|
-
whenContainedInInstancesOf: [FeedbackViewController.self]
|
366
|
-
).textColor = feedbackTextColor
|
367
|
-
}
|
368
|
-
if let feedbackCellColor = customFeedbackCellColor {
|
369
|
-
FeedbackCollectionView.appearance(for: traitCollection).cellColor = feedbackCellColor
|
370
|
-
}
|
371
|
-
|
372
|
-
// Road Shield Colors
|
373
|
-
if let blackColor = customRoadShieldBlackColor {
|
374
|
-
WayNameLabel.appearance(for: traitCollection).roadShieldBlackColor = blackColor
|
375
|
-
InstructionLabel.appearance(for: traitCollection).roadShieldBlackColor = blackColor
|
376
|
-
}
|
377
|
-
if let blueColor = customRoadShieldBlueColor {
|
378
|
-
WayNameLabel.appearance(for: traitCollection).roadShieldBlueColor = blueColor
|
379
|
-
InstructionLabel.appearance(for: traitCollection).roadShieldBlueColor = blueColor
|
380
|
-
}
|
381
|
-
if let greenColor = customRoadShieldGreenColor {
|
382
|
-
WayNameLabel.appearance(for: traitCollection).roadShieldGreenColor = greenColor
|
383
|
-
InstructionLabel.appearance(for: traitCollection).roadShieldGreenColor = greenColor
|
384
|
-
}
|
385
|
-
if let redColor = customRoadShieldRedColor {
|
386
|
-
WayNameLabel.appearance(for: traitCollection).roadShieldRedColor = redColor
|
387
|
-
InstructionLabel.appearance(for: traitCollection).roadShieldRedColor = redColor
|
388
|
-
}
|
389
|
-
if let whiteColor = customRoadShieldWhiteColor {
|
390
|
-
WayNameLabel.appearance(for: traitCollection).roadShieldWhiteColor = whiteColor
|
391
|
-
InstructionLabel.appearance(for: traitCollection).roadShieldWhiteColor = whiteColor
|
392
|
-
}
|
393
|
-
if let yellowColor = customRoadShieldYellowColor {
|
394
|
-
WayNameLabel.appearance(for: traitCollection).roadShieldYellowColor = yellowColor
|
395
|
-
InstructionLabel.appearance(for: traitCollection).roadShieldYellowColor = yellowColor
|
396
|
-
}
|
397
|
-
if let defaultColor = customRoadShieldDefaultColor {
|
398
|
-
WayNameLabel.appearance(for: traitCollection).roadShieldDefaultColor = defaultColor
|
399
|
-
InstructionLabel.appearance(for: traitCollection).roadShieldDefaultColor = defaultColor
|
400
|
-
}
|
401
|
-
|
402
|
-
// Navigation Map
|
403
|
-
Task { @MainActor in
|
404
|
-
if let alternateColor = customRouteAlternateColor {
|
405
|
-
NavigationMapView.appearance(for: traitCollection).routeAlternateColor = alternateColor
|
406
|
-
}
|
407
|
-
if let selectedColor = customRouteAnnotationSelectedColor {
|
408
|
-
NavigationMapView.appearance(for: traitCollection).routeAnnotationSelectedColor = selectedColor
|
409
|
-
}
|
410
|
-
if let annotationColor = customRouteAnnotationColor {
|
411
|
-
NavigationMapView.appearance(for: traitCollection).routeAnnotationColor = annotationColor
|
412
|
-
}
|
413
|
-
if let annotationTextColor = customRouteAnnotationTextColor {
|
414
|
-
NavigationMapView.appearance(for: traitCollection).routeAnnotationTextColor = annotationTextColor
|
415
|
-
}
|
416
|
-
if let selectedTextColor = customRouteAnnotationSelectedTextColor {
|
417
|
-
NavigationMapView.appearance(for: traitCollection).routeAnnotationSelectedTextColor = selectedTextColor
|
418
|
-
}
|
419
|
-
if let moreTimeTextColor = customRouteAnnotationMoreTimeTextColor {
|
420
|
-
NavigationMapView.appearance(for: traitCollection).routeAnnotationMoreTimeTextColor = moreTimeTextColor
|
421
|
-
}
|
422
|
-
if let lessTimeTextColor = customRouteAnnotationLessTimeTextColor {
|
423
|
-
NavigationMapView.appearance(for: traitCollection).routeAnnotationLessTimeTextColor = lessTimeTextColor
|
424
|
-
}
|
425
|
-
if let waypointColor = customWaypointColor {
|
426
|
-
NavigationMapView.appearance(for: traitCollection).waypointColor = waypointColor
|
427
|
-
}
|
428
|
-
if let waypointStrokeColor = customWaypointStrokeColor {
|
429
|
-
NavigationMapView.appearance(for: traitCollection).waypointStrokeColor = waypointStrokeColor
|
430
|
-
}
|
431
|
-
}
|
432
|
-
|
433
|
-
// Button Properties
|
434
|
-
if let textColor = customButtonTextColor {
|
435
|
-
Button.appearance(for: traitCollection).textColor = textColor
|
436
|
-
}
|
437
|
-
|
438
|
-
if let cancelTintColor = customCancelButtonTintColor {
|
439
|
-
CancelButton.appearance(for: traitCollection).tintColor = cancelTintColor
|
258
|
+
InstructionsCardContainerView.appearance(for: traitCollection).highlightedSeparatorColor = highlightedSeparatorColor
|
440
259
|
}
|
441
260
|
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
if let startTintColor = customStartButtonTintColor {
|
447
|
-
StartButton.appearance(for: traitCollection).tintColor = startTintColor
|
448
|
-
}
|
449
|
-
|
450
|
-
if let dismissBgColor = customDismissButtonBackgroundColor {
|
451
|
-
DismissButton.appearance(for: traitCollection).backgroundColor = dismissBgColor
|
452
|
-
}
|
453
|
-
|
454
|
-
if let dismissTextColor = customDismissButtonTextColor {
|
455
|
-
DismissButton.appearance(for: traitCollection).textColor = dismissTextColor
|
456
|
-
}
|
457
|
-
|
458
|
-
if let backBgColor = customBackButtonBackgroundColor {
|
459
|
-
BackButton.appearance(for: traitCollection).backgroundColor = backBgColor
|
460
|
-
}
|
461
|
-
|
462
|
-
if let backTintColor = customBackButtonTintColor {
|
463
|
-
BackButton.appearance(for: traitCollection).tintColor = backTintColor
|
464
|
-
}
|
465
|
-
|
466
|
-
if let backTextColor = customBackButtonTextColor {
|
467
|
-
BackButton.appearance(for: traitCollection).textColor = backTextColor
|
468
|
-
}
|
469
|
-
|
470
|
-
if let backBorderColor = customBackButtonBorderColor {
|
471
|
-
BackButton.appearance(for: traitCollection).borderColor = backBorderColor
|
261
|
+
// Exit View
|
262
|
+
if let fgColor = customExitViewForegroundColor {
|
263
|
+
ExitView.appearance(for: traitCollection).foregroundColor = fgColor
|
472
264
|
}
|
473
|
-
|
474
|
-
|
475
|
-
if let navBgColor = customNavigationViewBackgroundColor {
|
476
|
-
NavigationView.appearance(for: traitCollection).backgroundColor = navBgColor
|
265
|
+
if let borderColor = customExitViewBorderColor {
|
266
|
+
ExitView.appearance(for: traitCollection).borderColor = borderColor
|
477
267
|
}
|
478
|
-
|
479
|
-
|
480
|
-
if let unitTextColor = customDistanceLabelUnitTextColor {
|
481
|
-
DistanceLabel.appearance(for: traitCollection).unitTextColor = unitTextColor
|
268
|
+
if let highlightColor = customExitViewHighlightColor {
|
269
|
+
ExitView.appearance(for: traitCollection).highlightColor = highlightColor
|
482
270
|
}
|
483
271
|
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
// Steps Properties
|
489
|
-
if let bgViewColor = customStepsBackgroundViewColor {
|
490
|
-
StepsBackgroundView.appearance(for: traitCollection).backgroundColor = bgViewColor
|
272
|
+
// Route Shield
|
273
|
+
if let fgColor = customRouteShieldForegroundColor {
|
274
|
+
GenericRouteShield.appearance(for: traitCollection).foregroundColor = fgColor
|
491
275
|
}
|
492
|
-
|
493
|
-
|
494
|
-
StepInstructionsView.appearance(for: traitCollection).tintColor = headerTintColor
|
276
|
+
if let borderColor = customRouteShieldBorderColor {
|
277
|
+
GenericRouteShield.appearance(for: traitCollection).borderColor = borderColor
|
495
278
|
}
|
496
|
-
|
497
|
-
|
498
|
-
StepInstructionsView.appearance(for: traitCollection).textColor = headerTextColor
|
279
|
+
if let highlightColor = customRouteShieldHighlightColor {
|
280
|
+
GenericRouteShield.appearance(for: traitCollection).highlightColor = highlightColor
|
499
281
|
}
|
500
282
|
|
501
|
-
|
502
|
-
|
283
|
+
// Distance Labels
|
284
|
+
if let remainingColor = customDistanceRemainingColor {
|
285
|
+
DistanceRemainingLabel.appearance(for: traitCollection).normalTextColor = remainingColor
|
503
286
|
}
|
504
|
-
|
505
|
-
|
506
|
-
StepTableViewCell.appearance(for: traitCollection).backgroundColor = cellBgColor
|
287
|
+
if let unitColor = customDistanceUnitColor {
|
288
|
+
DistanceLabel.appearance(for: traitCollection).unitTextColor = unitColor
|
507
289
|
}
|
508
|
-
|
509
|
-
|
510
|
-
if let normalTextColor = customNextInstructionNormalTextColor {
|
511
|
-
NextInstructionLabel.appearance(for: traitCollection).normalTextColor = normalTextColor
|
290
|
+
if let valueColor = customDistanceValueColor {
|
291
|
+
DistanceLabel.appearance(for: traitCollection).valueTextColor = valueColor
|
512
292
|
}
|
513
293
|
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
whenContainedInInstancesOf: [NextBannerView.self]
|
518
|
-
).normalTextColor = containedTextColor
|
294
|
+
// Rating Control
|
295
|
+
if let normalColor = customRatingControlNormalColor {
|
296
|
+
RatingControl.appearance(for: traitCollection).normalColor = normalColor
|
519
297
|
}
|
520
|
-
|
521
|
-
|
522
|
-
if let normalTextColor = customSecondaryLabelNormalTextColor {
|
523
|
-
SecondaryLabel.appearance(for: traitCollection).normalTextColor = normalTextColor
|
524
|
-
}
|
525
|
-
|
526
|
-
// Stylable Label
|
527
|
-
if let normalTextColor = customStylableLabelNormalTextColor {
|
528
|
-
StylableLabel.appearance(for: traitCollection).normalTextColor = normalTextColor
|
529
|
-
}
|
530
|
-
|
531
|
-
// CarPlay Properties
|
532
|
-
if let compassBgColor = customCarPlayCompassBackgroundColor {
|
533
|
-
CarPlayCompassView.appearance(for: traitCollection).backgroundColor = compassBgColor
|
298
|
+
if let selectedColor = customRatingControlSelectedColor {
|
299
|
+
RatingControl.appearance(for: traitCollection).selectedColor = selectedColor
|
534
300
|
}
|
535
301
|
}
|
536
|
-
}
|
302
|
+
}
|