@complexify/expo-mapbox-navigation 1.1.7 → 1.1.9
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.
- package/build/ExpoMapboxNavigation.types.d.ts +83 -3
- package/build/ExpoMapboxNavigation.types.d.ts.map +1 -1
- package/build/ExpoMapboxNavigation.types.js.map +1 -1
- package/ios/CustomNavigationStyle.swift +432 -22
- package/ios/ExpoMapboxNavigationModule.swift +353 -0
- package/ios/ExpoMapboxNavigationView.swift +340 -0
- package/package.json +1 -1
- package/src/ExpoMapboxNavigation.types.ts +130 -6
@@ -233,6 +233,359 @@ public class ExpoMapboxNavigationModule: Module {
|
|
233
233
|
view.controller.setManeuverViewBackgroundColor(hexColor: hexColor)
|
234
234
|
}
|
235
235
|
}
|
236
|
+
|
237
|
+
Prop("maneuverViewPrimaryColorHighlighted") { (view: ExpoMapboxNavigationView, color: String?) in
|
238
|
+
if let hexColor = color {
|
239
|
+
view.controller.setManeuverViewPrimaryColorHighlighted(hexColor: hexColor)
|
240
|
+
}
|
241
|
+
}
|
242
|
+
|
243
|
+
Prop("maneuverViewSecondaryColorHighlighted") { (view: ExpoMapboxNavigationView, color: String?) in
|
244
|
+
if let hexColor = color {
|
245
|
+
view.controller.setManeuverViewSecondaryColorHighlighted(hexColor: hexColor)
|
246
|
+
}
|
247
|
+
}
|
248
|
+
|
249
|
+
// Way Name View
|
250
|
+
Prop("wayNameViewTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
251
|
+
if let hexColor = color {
|
252
|
+
view.controller.setWayNameViewTextColor(hexColor: hexColor)
|
253
|
+
}
|
254
|
+
}
|
255
|
+
|
256
|
+
// Steps List
|
257
|
+
Prop("stepsBackgroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
258
|
+
if let hexColor = color {
|
259
|
+
view.controller.setStepsBackgroundColor(hexColor: hexColor)
|
260
|
+
}
|
261
|
+
}
|
262
|
+
|
263
|
+
Prop("stepsPrimaryTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
264
|
+
if let hexColor = color {
|
265
|
+
view.controller.setStepsPrimaryTextColor(hexColor: hexColor)
|
266
|
+
}
|
267
|
+
}
|
268
|
+
|
269
|
+
Prop("stepsSecondaryTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
270
|
+
if let hexColor = color {
|
271
|
+
view.controller.setStepsSecondaryTextColor(hexColor: hexColor)
|
272
|
+
}
|
273
|
+
}
|
274
|
+
|
275
|
+
Prop("stepsManeuverViewPrimaryColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
276
|
+
if let hexColor = color {
|
277
|
+
view.controller.setStepsManeuverViewPrimaryColor(hexColor: hexColor)
|
278
|
+
}
|
279
|
+
}
|
280
|
+
|
281
|
+
Prop("stepsManeuverViewSecondaryColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
282
|
+
if let hexColor = color {
|
283
|
+
view.controller.setStepsManeuverViewSecondaryColor(hexColor: hexColor)
|
284
|
+
}
|
285
|
+
}
|
286
|
+
|
287
|
+
Prop("stepsSeparatorColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
288
|
+
if let hexColor = color {
|
289
|
+
view.controller.setStepsSeparatorColor(hexColor: hexColor)
|
290
|
+
}
|
291
|
+
}
|
292
|
+
|
293
|
+
// Lane View
|
294
|
+
Prop("laneViewBackgroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
295
|
+
if let hexColor = color {
|
296
|
+
view.controller.setLaneViewBackgroundColor(hexColor: hexColor)
|
297
|
+
}
|
298
|
+
}
|
299
|
+
|
300
|
+
Prop("laneViewForegroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
301
|
+
if let hexColor = color {
|
302
|
+
view.controller.setLaneViewForegroundColor(hexColor: hexColor)
|
303
|
+
}
|
304
|
+
}
|
305
|
+
|
306
|
+
Prop("laneViewSeparatorColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
307
|
+
if let hexColor = color {
|
308
|
+
view.controller.setLaneViewSeparatorColor(hexColor: hexColor)
|
309
|
+
}
|
310
|
+
}
|
311
|
+
|
312
|
+
// Next Banner View
|
313
|
+
Prop("nextBannerBackgroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
314
|
+
if let hexColor = color {
|
315
|
+
view.controller.setNextBannerBackgroundColor(hexColor: hexColor)
|
316
|
+
}
|
317
|
+
}
|
318
|
+
|
319
|
+
Prop("nextBannerPrimaryTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
320
|
+
if let hexColor = color {
|
321
|
+
view.controller.setNextBannerPrimaryTextColor(hexColor: hexColor)
|
322
|
+
}
|
323
|
+
}
|
324
|
+
|
325
|
+
Prop("nextBannerSecondaryTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
326
|
+
if let hexColor = color {
|
327
|
+
view.controller.setNextBannerSecondaryTextColor(hexColor: hexColor)
|
328
|
+
}
|
329
|
+
}
|
330
|
+
|
331
|
+
Prop("nextBannerDistanceTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
332
|
+
if let hexColor = color {
|
333
|
+
view.controller.setNextBannerDistanceTextColor(hexColor: hexColor)
|
334
|
+
}
|
335
|
+
}
|
336
|
+
|
337
|
+
// Progress Bar
|
338
|
+
Prop("progressBarProgressColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
339
|
+
if let hexColor = color {
|
340
|
+
view.controller.setProgressBarProgressColor(hexColor: hexColor)
|
341
|
+
}
|
342
|
+
}
|
343
|
+
|
344
|
+
Prop("progressBarBackgroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
345
|
+
if let hexColor = color {
|
346
|
+
view.controller.setProgressBarBackgroundColor(hexColor: hexColor)
|
347
|
+
}
|
348
|
+
}
|
349
|
+
|
350
|
+
// Instructions Card
|
351
|
+
Prop("instructionsCardBackgroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
352
|
+
if let hexColor = color {
|
353
|
+
view.setInstructionsCardBackgroundColor(hexColor: hexColor)
|
354
|
+
}
|
355
|
+
}
|
356
|
+
|
357
|
+
Prop("instructionsCardSeparatorColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
358
|
+
if let hexColor = color {
|
359
|
+
view.setInstructionsCardSeparatorColor(hexColor: hexColor)
|
360
|
+
}
|
361
|
+
}
|
362
|
+
|
363
|
+
Prop("instructionsCardHighlightedSeparatorColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
364
|
+
if let hexColor = color {
|
365
|
+
view.setInstructionsCardHighlightedSeparatorColor(hexColor: hexColor)
|
366
|
+
}
|
367
|
+
}
|
368
|
+
|
369
|
+
// Exit View
|
370
|
+
Prop("exitViewForegroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
371
|
+
if let hexColor = color {
|
372
|
+
view.setExitViewForegroundColor(hexColor: hexColor)
|
373
|
+
}
|
374
|
+
}
|
375
|
+
|
376
|
+
Prop("exitViewBorderColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
377
|
+
if let hexColor = color {
|
378
|
+
view.setExitViewBorderColor(hexColor: hexColor)
|
379
|
+
}
|
380
|
+
}
|
381
|
+
|
382
|
+
Prop("exitViewHighlightColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
383
|
+
if let hexColor = color {
|
384
|
+
view.setExitViewHighlightColor(hexColor: hexColor)
|
385
|
+
}
|
386
|
+
}
|
387
|
+
|
388
|
+
// Route Shield Colors
|
389
|
+
Prop("roadShieldBlackColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
390
|
+
if let hexColor = color {
|
391
|
+
view.setRoadShieldBlackColor(hexColor: hexColor)
|
392
|
+
}
|
393
|
+
}
|
394
|
+
|
395
|
+
Prop("roadShieldBlueColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
396
|
+
if let hexColor = color {
|
397
|
+
view.setRoadShieldBlueColor(hexColor: hexColor)
|
398
|
+
}
|
399
|
+
}
|
400
|
+
|
401
|
+
Prop("roadShieldGreenColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
402
|
+
if let hexColor = color {
|
403
|
+
view.setRoadShieldGreenColor(hexColor: hexColor)
|
404
|
+
}
|
405
|
+
}
|
406
|
+
|
407
|
+
Prop("roadShieldRedColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
408
|
+
if let hexColor = color {
|
409
|
+
view.setRoadShieldRedColor(hexColor: hexColor)
|
410
|
+
}
|
411
|
+
}
|
412
|
+
|
413
|
+
Prop("roadShieldWhiteColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
414
|
+
if let hexColor = color {
|
415
|
+
view.setRoadShieldWhiteColor(hexColor: hexColor)
|
416
|
+
}
|
417
|
+
}
|
418
|
+
|
419
|
+
Prop("roadShieldYellowColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
420
|
+
if let hexColor = color {
|
421
|
+
view.setRoadShieldYellowColor(hexColor: hexColor)
|
422
|
+
}
|
423
|
+
}
|
424
|
+
|
425
|
+
Prop("roadShieldDefaultColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
426
|
+
if let hexColor = color {
|
427
|
+
view.setRoadShieldDefaultColor(hexColor: hexColor)
|
428
|
+
}
|
429
|
+
}
|
430
|
+
|
431
|
+
// Button Properties
|
432
|
+
Prop("buttonTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
433
|
+
if let hexColor = color {
|
434
|
+
view.setButtonTextColor(hexColor: hexColor)
|
435
|
+
}
|
436
|
+
}
|
437
|
+
|
438
|
+
Prop("cancelButtonTintColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
439
|
+
if let hexColor = color {
|
440
|
+
view.setCancelButtonTintColor(hexColor: hexColor)
|
441
|
+
}
|
442
|
+
}
|
443
|
+
|
444
|
+
Prop("previewButtonTintColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
445
|
+
if let hexColor = color {
|
446
|
+
view.setPreviewButtonTintColor(hexColor: hexColor)
|
447
|
+
}
|
448
|
+
}
|
449
|
+
|
450
|
+
Prop("startButtonTintColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
451
|
+
if let hexColor = color {
|
452
|
+
view.setStartButtonTintColor(hexColor: hexColor)
|
453
|
+
}
|
454
|
+
}
|
455
|
+
|
456
|
+
Prop("dismissButtonBackgroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
457
|
+
if let hexColor = color {
|
458
|
+
view.setDismissButtonBackgroundColor(hexColor: hexColor)
|
459
|
+
}
|
460
|
+
}
|
461
|
+
|
462
|
+
Prop("dismissButtonTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
463
|
+
if let hexColor = color {
|
464
|
+
view.setDismissButtonTextColor(hexColor: hexColor)
|
465
|
+
}
|
466
|
+
}
|
467
|
+
|
468
|
+
Prop("backButtonBackgroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
469
|
+
if let hexColor = color {
|
470
|
+
view.setBackButtonBackgroundColor(hexColor: hexColor)
|
471
|
+
}
|
472
|
+
}
|
473
|
+
|
474
|
+
Prop("backButtonTintColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
475
|
+
if let hexColor = color {
|
476
|
+
view.setBackButtonTintColor(hexColor: hexColor)
|
477
|
+
}
|
478
|
+
}
|
479
|
+
|
480
|
+
Prop("backButtonTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
481
|
+
if let hexColor = color {
|
482
|
+
view.setBackButtonTextColor(hexColor: hexColor)
|
483
|
+
}
|
484
|
+
}
|
485
|
+
|
486
|
+
Prop("backButtonBorderColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
487
|
+
if let hexColor = color {
|
488
|
+
view.setBackButtonBorderColor(hexColor: hexColor)
|
489
|
+
}
|
490
|
+
}
|
491
|
+
|
492
|
+
// Navigation View
|
493
|
+
Prop("navigationViewBackgroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
494
|
+
if let hexColor = color {
|
495
|
+
view.setNavigationViewBackgroundColor(hexColor: hexColor)
|
496
|
+
}
|
497
|
+
}
|
498
|
+
|
499
|
+
// Distance Label Properties
|
500
|
+
Prop("distanceLabelUnitTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
501
|
+
if let hexColor = color {
|
502
|
+
view.setDistanceLabelUnitTextColor(hexColor: hexColor)
|
503
|
+
}
|
504
|
+
}
|
505
|
+
|
506
|
+
Prop("distanceLabelValueTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
507
|
+
if let hexColor = color {
|
508
|
+
view.setDistanceLabelValueTextColor(hexColor: hexColor)
|
509
|
+
}
|
510
|
+
}
|
511
|
+
|
512
|
+
// Rating Control
|
513
|
+
Prop("ratingControlNormalColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
514
|
+
if let hexColor = color {
|
515
|
+
view.setRatingControlNormalColor(hexColor: hexColor)
|
516
|
+
}
|
517
|
+
}
|
518
|
+
|
519
|
+
Prop("ratingControlSelectedColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
520
|
+
if let hexColor = color {
|
521
|
+
view.setRatingControlSelectedColor(hexColor: hexColor)
|
522
|
+
}
|
523
|
+
}
|
524
|
+
|
525
|
+
// Steps Properties
|
526
|
+
Prop("stepsBackgroundViewColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
527
|
+
if let hexColor = color {
|
528
|
+
view.setStepsBackgroundViewColor(hexColor: hexColor)
|
529
|
+
}
|
530
|
+
}
|
531
|
+
|
532
|
+
Prop("stepsTableHeaderTintColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
533
|
+
if let hexColor = color {
|
534
|
+
view.setStepsTableHeaderTintColor(hexColor: hexColor)
|
535
|
+
}
|
536
|
+
}
|
537
|
+
|
538
|
+
Prop("stepsTableHeaderTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
539
|
+
if let hexColor = color {
|
540
|
+
view.setStepsTableHeaderTextColor(hexColor: hexColor)
|
541
|
+
}
|
542
|
+
}
|
543
|
+
|
544
|
+
Prop("stepInstructionsBackgroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
545
|
+
if let hexColor = color {
|
546
|
+
view.setStepInstructionsBackgroundColor(hexColor: hexColor)
|
547
|
+
}
|
548
|
+
}
|
549
|
+
|
550
|
+
Prop("stepTableViewCellBackgroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
551
|
+
if let hexColor = color {
|
552
|
+
view.setStepTableViewCellBackgroundColor(hexColor: hexColor)
|
553
|
+
}
|
554
|
+
}
|
555
|
+
|
556
|
+
// Next Instruction
|
557
|
+
Prop("nextInstructionNormalTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
558
|
+
if let hexColor = color {
|
559
|
+
view.setNextInstructionNormalTextColor(hexColor: hexColor)
|
560
|
+
}
|
561
|
+
}
|
562
|
+
|
563
|
+
Prop("nextInstructionContainedTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
564
|
+
if let hexColor = color {
|
565
|
+
view.setNextInstructionContainedTextColor(hexColor: hexColor)
|
566
|
+
}
|
567
|
+
}
|
568
|
+
|
569
|
+
// Secondary Label Properties
|
570
|
+
Prop("secondaryLabelNormalTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
571
|
+
if let hexColor = color {
|
572
|
+
view.setSecondaryLabelNormalTextColor(hexColor: hexColor)
|
573
|
+
}
|
574
|
+
}
|
575
|
+
|
576
|
+
// Stylable Label
|
577
|
+
Prop("stylableLabelNormalTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
578
|
+
if let hexColor = color {
|
579
|
+
view.setStylableLabelNormalTextColor(hexColor: hexColor)
|
580
|
+
}
|
581
|
+
}
|
582
|
+
|
583
|
+
// CarPlay Properties
|
584
|
+
Prop("carPlayCompassBackgroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
585
|
+
if let hexColor = color {
|
586
|
+
view.setCarPlayCompassBackgroundColor(hexColor: hexColor)
|
587
|
+
}
|
588
|
+
}
|
236
589
|
}
|
237
590
|
}
|
238
591
|
}
|
@@ -34,6 +34,336 @@ class ExpoMapboxNavigationView: ExpoView {
|
|
34
34
|
override func layoutSubviews() {
|
35
35
|
controller.view.frame = bounds
|
36
36
|
}
|
37
|
+
|
38
|
+
// Way Name View
|
39
|
+
func setWayNameViewTextColor(hexColor: String) {
|
40
|
+
controller.customDayStyle.customWayNameTextColor = UIColor(hex: hexColor)
|
41
|
+
controller.update()
|
42
|
+
}
|
43
|
+
|
44
|
+
// Steps List
|
45
|
+
func setStepsBackgroundColor(hexColor: String) {
|
46
|
+
controller.customDayStyle.customStepsBackgroundColor = UIColor(hex: hexColor)
|
47
|
+
controller.update()
|
48
|
+
}
|
49
|
+
|
50
|
+
func setStepsPrimaryTextColor(hexColor: String) {
|
51
|
+
controller.customDayStyle.customStepsPrimaryTextColor = UIColor(hex: hexColor)
|
52
|
+
controller.update()
|
53
|
+
}
|
54
|
+
|
55
|
+
func setStepsSecondaryTextColor(hexColor: String) {
|
56
|
+
controller.customDayStyle.customStepsSecondaryTextColor = UIColor(hex: hexColor)
|
57
|
+
controller.update()
|
58
|
+
}
|
59
|
+
|
60
|
+
func setStepsManeuverViewPrimaryColor(hexColor: String) {
|
61
|
+
controller.customDayStyle.customStepsManeuverViewPrimaryColor = UIColor(hex: hexColor)
|
62
|
+
controller.update()
|
63
|
+
}
|
64
|
+
|
65
|
+
func setStepsManeuverViewSecondaryColor(hexColor: String) {
|
66
|
+
controller.customDayStyle.customStepsManeuverViewSecondaryColor = UIColor(hex: hexColor)
|
67
|
+
controller.update()
|
68
|
+
}
|
69
|
+
|
70
|
+
func setStepsSeparatorColor(hexColor: String) {
|
71
|
+
controller.customDayStyle.customStepsSeparatorColor = UIColor(hex: hexColor)
|
72
|
+
controller.update()
|
73
|
+
}
|
74
|
+
|
75
|
+
// Lane View
|
76
|
+
func setLaneViewBackgroundColor(hexColor: String) {
|
77
|
+
controller.customDayStyle.customLaneViewBackgroundColor = UIColor(hex: hexColor)
|
78
|
+
controller.update()
|
79
|
+
}
|
80
|
+
|
81
|
+
func setLaneViewForegroundColor(hexColor: String) {
|
82
|
+
controller.customDayStyle.customLaneViewForegroundColor = UIColor(hex: hexColor)
|
83
|
+
controller.update()
|
84
|
+
}
|
85
|
+
|
86
|
+
func setLaneViewSeparatorColor(hexColor: String) {
|
87
|
+
controller.customDayStyle.customLaneViewSeparatorColor = UIColor(hex: hexColor)
|
88
|
+
controller.update()
|
89
|
+
}
|
90
|
+
|
91
|
+
// Next Banner View
|
92
|
+
func setNextBannerBackgroundColor(hexColor: String) {
|
93
|
+
controller.customDayStyle.customNextBannerBackgroundColor = UIColor(hex: hexColor)
|
94
|
+
controller.update()
|
95
|
+
}
|
96
|
+
|
97
|
+
func setNextBannerPrimaryTextColor(hexColor: String) {
|
98
|
+
controller.customDayStyle.customNextBannerPrimaryTextColor = UIColor(hex: hexColor)
|
99
|
+
controller.update()
|
100
|
+
}
|
101
|
+
|
102
|
+
func setNextBannerSecondaryTextColor(hexColor: String) {
|
103
|
+
controller.customDayStyle.customNextBannerSecondaryTextColor = UIColor(hex: hexColor)
|
104
|
+
controller.update()
|
105
|
+
}
|
106
|
+
|
107
|
+
func setNextBannerDistanceTextColor(hexColor: String) {
|
108
|
+
controller.customDayStyle.customNextBannerDistanceTextColor = UIColor(hex: hexColor)
|
109
|
+
controller.update()
|
110
|
+
}
|
111
|
+
|
112
|
+
// Progress Bar
|
113
|
+
func setProgressBarProgressColor(hexColor: String) {
|
114
|
+
controller.customDayStyle.customProgressBarProgressColor = UIColor(hex: hexColor)
|
115
|
+
controller.update()
|
116
|
+
}
|
117
|
+
|
118
|
+
func setProgressBarBackgroundColor(hexColor: String) {
|
119
|
+
controller.customDayStyle.customProgressBarBackgroundColor = UIColor(hex: hexColor)
|
120
|
+
controller.update()
|
121
|
+
}
|
122
|
+
|
123
|
+
// Instructions Card
|
124
|
+
func setInstructionsCardBackgroundColor(hexColor: String) {
|
125
|
+
controller.customDayStyle.customInstructionsCardBackgroundColor = UIColor(hex: hexColor)
|
126
|
+
controller.update()
|
127
|
+
}
|
128
|
+
|
129
|
+
func setInstructionsCardSeparatorColor(hexColor: String) {
|
130
|
+
controller.customDayStyle.customInstructionsCardSeparatorColor = UIColor(hex: hexColor)
|
131
|
+
controller.update()
|
132
|
+
}
|
133
|
+
|
134
|
+
func setInstructionsCardHighlightedSeparatorColor(hexColor: String) {
|
135
|
+
controller.customDayStyle.customInstructionsCardHighlightedSeparatorColor = UIColor(hex: hexColor)
|
136
|
+
controller.update()
|
137
|
+
}
|
138
|
+
|
139
|
+
// Exit View
|
140
|
+
func setExitViewForegroundColor(hexColor: String) {
|
141
|
+
controller.customDayStyle.customExitViewForegroundColor = UIColor(hex: hexColor)
|
142
|
+
controller.update()
|
143
|
+
}
|
144
|
+
|
145
|
+
func setExitViewBorderColor(hexColor: String) {
|
146
|
+
controller.customDayStyle.customExitViewBorderColor = UIColor(hex: hexColor)
|
147
|
+
controller.update()
|
148
|
+
}
|
149
|
+
|
150
|
+
func setExitViewHighlightColor(hexColor: String) {
|
151
|
+
controller.customDayStyle.customExitViewHighlightColor = UIColor(hex: hexColor)
|
152
|
+
controller.update()
|
153
|
+
}
|
154
|
+
|
155
|
+
// Route Shield
|
156
|
+
func setRouteShieldForegroundColor(hexColor: String) {
|
157
|
+
controller.customDayStyle.customRouteShieldForegroundColor = UIColor(hex: hexColor)
|
158
|
+
controller.update()
|
159
|
+
}
|
160
|
+
|
161
|
+
func setRouteShieldBorderColor(hexColor: String) {
|
162
|
+
controller.customDayStyle.customRouteShieldBorderColor = UIColor(hex: hexColor)
|
163
|
+
controller.update()
|
164
|
+
}
|
165
|
+
|
166
|
+
func setRouteShieldHighlightColor(hexColor: String) {
|
167
|
+
controller.customDayStyle.customRouteShieldHighlightColor = UIColor(hex: hexColor)
|
168
|
+
controller.update()
|
169
|
+
}
|
170
|
+
|
171
|
+
// Distance Labels
|
172
|
+
func setDistanceRemainingColor(hexColor: String) {
|
173
|
+
controller.customDayStyle.customDistanceRemainingColor = UIColor(hex: hexColor)
|
174
|
+
controller.update()
|
175
|
+
}
|
176
|
+
|
177
|
+
func setDistanceUnitColor(hexColor: String) {
|
178
|
+
controller.customDayStyle.customDistanceUnitColor = UIColor(hex: hexColor)
|
179
|
+
controller.update()
|
180
|
+
}
|
181
|
+
|
182
|
+
func setDistanceValueColor(hexColor: String) {
|
183
|
+
controller.customDayStyle.customDistanceValueColor = UIColor(hex: hexColor)
|
184
|
+
controller.update()
|
185
|
+
}
|
186
|
+
|
187
|
+
// Navigation Map
|
188
|
+
func setRouteAnnotationSelectedColor(hexColor: String) {
|
189
|
+
controller.customDayStyle.customRouteAnnotationSelectedColor = UIColor(hex: hexColor)
|
190
|
+
controller.update()
|
191
|
+
}
|
192
|
+
|
193
|
+
func setRouteAnnotationColor(hexColor: String) {
|
194
|
+
controller.customDayStyle.customRouteAnnotationColor = UIColor(hex: hexColor)
|
195
|
+
controller.update()
|
196
|
+
}
|
197
|
+
|
198
|
+
// Route Shield Colors
|
199
|
+
func setRoadShieldBlackColor(hexColor: String) {
|
200
|
+
controller.customDayStyle.customRoadShieldBlackColor = UIColor(hex: hexColor)
|
201
|
+
controller.update()
|
202
|
+
}
|
203
|
+
|
204
|
+
func setRoadShieldBlueColor(hexColor: String) {
|
205
|
+
controller.customDayStyle.customRoadShieldBlueColor = UIColor(hex: hexColor)
|
206
|
+
controller.update()
|
207
|
+
}
|
208
|
+
|
209
|
+
func setRoadShieldGreenColor(hexColor: String) {
|
210
|
+
controller.customDayStyle.customRoadShieldGreenColor = UIColor(hex: hexColor)
|
211
|
+
controller.update()
|
212
|
+
}
|
213
|
+
|
214
|
+
func setRoadShieldRedColor(hexColor: String) {
|
215
|
+
controller.customDayStyle.customRoadShieldRedColor = UIColor(hex: hexColor)
|
216
|
+
controller.update()
|
217
|
+
}
|
218
|
+
|
219
|
+
func setRoadShieldWhiteColor(hexColor: String) {
|
220
|
+
controller.customDayStyle.customRoadShieldWhiteColor = UIColor(hex: hexColor)
|
221
|
+
controller.update()
|
222
|
+
}
|
223
|
+
|
224
|
+
func setRoadShieldYellowColor(hexColor: String) {
|
225
|
+
controller.customDayStyle.customRoadShieldYellowColor = UIColor(hex: hexColor)
|
226
|
+
controller.update()
|
227
|
+
}
|
228
|
+
|
229
|
+
func setRoadShieldDefaultColor(hexColor: String) {
|
230
|
+
controller.customDayStyle.customRoadShieldDefaultColor = UIColor(hex: hexColor)
|
231
|
+
controller.update()
|
232
|
+
}
|
233
|
+
|
234
|
+
// Button Properties
|
235
|
+
func setButtonTextColor(hexColor: String) {
|
236
|
+
controller.customDayStyle.customButtonTextColor = UIColor(hex: hexColor)
|
237
|
+
controller.update()
|
238
|
+
}
|
239
|
+
|
240
|
+
func setCancelButtonTintColor(hexColor: String) {
|
241
|
+
controller.customDayStyle.customCancelButtonTintColor = UIColor(hex: hexColor)
|
242
|
+
controller.update()
|
243
|
+
}
|
244
|
+
|
245
|
+
func setPreviewButtonTintColor(hexColor: String) {
|
246
|
+
controller.customDayStyle.customPreviewButtonTintColor = UIColor(hex: hexColor)
|
247
|
+
controller.update()
|
248
|
+
}
|
249
|
+
|
250
|
+
func setStartButtonTintColor(hexColor: String) {
|
251
|
+
controller.customDayStyle.customStartButtonTintColor = UIColor(hex: hexColor)
|
252
|
+
controller.update()
|
253
|
+
}
|
254
|
+
|
255
|
+
func setDismissButtonBackgroundColor(hexColor: String) {
|
256
|
+
controller.customDayStyle.customDismissButtonBackgroundColor = UIColor(hex: hexColor)
|
257
|
+
controller.update()
|
258
|
+
}
|
259
|
+
|
260
|
+
func setDismissButtonTextColor(hexColor: String) {
|
261
|
+
controller.customDayStyle.customDismissButtonTextColor = UIColor(hex: hexColor)
|
262
|
+
controller.update()
|
263
|
+
}
|
264
|
+
|
265
|
+
func setBackButtonBackgroundColor(hexColor: String) {
|
266
|
+
controller.customDayStyle.customBackButtonBackgroundColor = UIColor(hex: hexColor)
|
267
|
+
controller.update()
|
268
|
+
}
|
269
|
+
|
270
|
+
func setBackButtonTintColor(hexColor: String) {
|
271
|
+
controller.customDayStyle.customBackButtonTintColor = UIColor(hex: hexColor)
|
272
|
+
controller.update()
|
273
|
+
}
|
274
|
+
|
275
|
+
func setBackButtonTextColor(hexColor: String) {
|
276
|
+
controller.customDayStyle.customBackButtonTextColor = UIColor(hex: hexColor)
|
277
|
+
controller.update()
|
278
|
+
}
|
279
|
+
|
280
|
+
func setBackButtonBorderColor(hexColor: String) {
|
281
|
+
controller.customDayStyle.customBackButtonBorderColor = UIColor(hex: hexColor)
|
282
|
+
controller.update()
|
283
|
+
}
|
284
|
+
|
285
|
+
// Navigation View
|
286
|
+
func setNavigationViewBackgroundColor(hexColor: String) {
|
287
|
+
controller.customDayStyle.customNavigationViewBackgroundColor = UIColor(hex: hexColor)
|
288
|
+
controller.update()
|
289
|
+
}
|
290
|
+
|
291
|
+
// Distance Label Properties
|
292
|
+
func setDistanceLabelUnitTextColor(hexColor: String) {
|
293
|
+
controller.customDayStyle.customDistanceLabelUnitTextColor = UIColor(hex: hexColor)
|
294
|
+
controller.update()
|
295
|
+
}
|
296
|
+
|
297
|
+
func setDistanceLabelValueTextColor(hexColor: String) {
|
298
|
+
controller.customDayStyle.customDistanceLabelValueTextColor = UIColor(hex: hexColor)
|
299
|
+
controller.update()
|
300
|
+
}
|
301
|
+
|
302
|
+
// Rating Control
|
303
|
+
func setRatingControlNormalColor(hexColor: String) {
|
304
|
+
controller.customDayStyle.customRatingControlNormalColor = UIColor(hex: hexColor)
|
305
|
+
controller.update()
|
306
|
+
}
|
307
|
+
|
308
|
+
func setRatingControlSelectedColor(hexColor: String) {
|
309
|
+
controller.customDayStyle.customRatingControlSelectedColor = UIColor(hex: hexColor)
|
310
|
+
controller.update()
|
311
|
+
}
|
312
|
+
|
313
|
+
// Steps Properties
|
314
|
+
func setStepsBackgroundViewColor(hexColor: String) {
|
315
|
+
controller.customDayStyle.customStepsBackgroundViewColor = UIColor(hex: hexColor)
|
316
|
+
controller.update()
|
317
|
+
}
|
318
|
+
|
319
|
+
func setStepsTableHeaderTintColor(hexColor: String) {
|
320
|
+
controller.customDayStyle.customStepsTableHeaderTintColor = UIColor(hex: hexColor)
|
321
|
+
controller.update()
|
322
|
+
}
|
323
|
+
|
324
|
+
func setStepsTableHeaderTextColor(hexColor: String) {
|
325
|
+
controller.customDayStyle.customStepsTableHeaderTextColor = UIColor(hex: hexColor)
|
326
|
+
controller.update()
|
327
|
+
}
|
328
|
+
|
329
|
+
func setStepInstructionsBackgroundColor(hexColor: String) {
|
330
|
+
controller.customDayStyle.customStepInstructionsBackgroundColor = UIColor(hex: hexColor)
|
331
|
+
controller.update()
|
332
|
+
}
|
333
|
+
|
334
|
+
func setStepTableViewCellBackgroundColor(hexColor: String) {
|
335
|
+
controller.customDayStyle.customStepTableViewCellBackgroundColor = UIColor(hex: hexColor)
|
336
|
+
controller.update()
|
337
|
+
}
|
338
|
+
|
339
|
+
// Next Instruction
|
340
|
+
func setNextInstructionNormalTextColor(hexColor: String) {
|
341
|
+
controller.customDayStyle.customNextInstructionNormalTextColor = UIColor(hex: hexColor)
|
342
|
+
controller.update()
|
343
|
+
}
|
344
|
+
|
345
|
+
func setNextInstructionContainedTextColor(hexColor: String) {
|
346
|
+
controller.customDayStyle.customNextInstructionContainedTextColor = UIColor(hex: hexColor)
|
347
|
+
controller.update()
|
348
|
+
}
|
349
|
+
|
350
|
+
// Secondary Label Properties
|
351
|
+
func setSecondaryLabelNormalTextColor(hexColor: String) {
|
352
|
+
controller.customDayStyle.customSecondaryLabelNormalTextColor = UIColor(hex: hexColor)
|
353
|
+
controller.update()
|
354
|
+
}
|
355
|
+
|
356
|
+
// Stylable Label
|
357
|
+
func setStylableLabelNormalTextColor(hexColor: String) {
|
358
|
+
controller.customDayStyle.customStylableLabelNormalTextColor = UIColor(hex: hexColor)
|
359
|
+
controller.update()
|
360
|
+
}
|
361
|
+
|
362
|
+
// CarPlay Properties
|
363
|
+
func setCarPlayCompassBackgroundColor(hexColor: String) {
|
364
|
+
controller.customDayStyle.customCarPlayCompassBackgroundColor = UIColor(hex: hexColor)
|
365
|
+
controller.update()
|
366
|
+
}
|
37
367
|
}
|
38
368
|
|
39
369
|
|
@@ -364,6 +694,16 @@ class ExpoMapboxNavigationViewController: UIViewController {
|
|
364
694
|
update()
|
365
695
|
}
|
366
696
|
|
697
|
+
func setManeuverViewPrimaryColorHighlighted(hexColor: String) {
|
698
|
+
customDayStyle.customManeuverViewPrimaryColorHighlighted = UIColor(hex: hexColor)
|
699
|
+
update()
|
700
|
+
}
|
701
|
+
|
702
|
+
func setManeuverViewSecondaryColorHighlighted(hexColor: String) {
|
703
|
+
customDayStyle.customManeuverViewSecondaryColorHighlighted = UIColor(hex: hexColor)
|
704
|
+
update()
|
705
|
+
}
|
706
|
+
|
367
707
|
func update(){
|
368
708
|
calculateRoutesTask?.cancel()
|
369
709
|
|