Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NavigationView Hookup #1063

Merged
merged 89 commits into from
Feb 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
c9ff71d
WIP - Refactoring IUO's out of NavigationView.
Jan 23, 2018
985488a
we can do better than T
Jan 23, 2018
2fda6fb
Doh!
Jan 23, 2018
54e93c7
Adding needed delegate hookups.
Jan 23, 2018
6c7adcc
Intensifying shininess
Jan 23, 2018
ed962a6
WIP: Hooking up references in RMVC. Lots of delegate issues remain.
Jan 23, 2018
76da95d
I has good spelling
Jan 23, 2018
166d64e
unsnarling RouteMapViewControllerDelegate
Jan 24, 2018
1d1dd86
mlem
Jan 24, 2018
14c0e9c
Make it build
frederoni Jan 24, 2018
8341c58
Fix tests
frederoni Jan 24, 2018
b686a3a
Unsnarling build errors on StepsViewController, also small refactor s…
Jan 24, 2018
14a2452
This call actually belongs in that method.
Jan 24, 2018
f2985a8
oops
Jan 24, 2018
8d56abd
bug: super call in overloaded loadView()
Jan 24, 2018
2e794a3
Swapping instantiation out from storyboard to code-based. Starting to…
Jan 24, 2018
9fedf2a
Delegate work. Trying to consolidate delegate logic together and make…
Jan 25, 2018
8d5aba5
Fixing much of the remaining bugs and making the final delegate / tar…
Jan 26, 2018
72cd75f
Satisfying.
Jan 26, 2018
a6462be
hooking up EORVC to new architechture
Jan 27, 2018
3e8c8ee
FeedbackViewController hookup
Jan 27, 2018
2d8aea8
Enhancing Shiny
Jan 27, 2018
f88104e
Hooking up EORVC
Feb 5, 2018
b40215b
Fixing StepsViewController
Feb 7, 2018
41401e3
Fixing appearance of floating buttons.
Feb 7, 2018
f20fea6
Fixing issue with Styling and WayNameLabel
Feb 8, 2018
5a45a0a
Expose course tracking delegate
frederoni Feb 12, 2018
66f4379
Remove previous course tracking view when setting a new one
frederoni Feb 12, 2018
eef330b
Tweak course tracking behavior
frederoni Feb 12, 2018
32c69f4
Cherry Pick -- conflicting
frederoni Feb 12, 2018
bfc905b
WIP -- getting closer...
Feb 12, 2018
de5fd5c
Fixing "Falling From Space" issue by issuing an immediate camera upda…
Feb 13, 2018
7487af7
Cleaning up NavigationMapView.
Feb 13, 2018
0abdb4a
On closer examination, it looks like this doesn't significantly affec…
Feb 13, 2018
3349d90
Fixing issue where Reroutes reference abandoned IBOutlet IUO and caus…
Feb 13, 2018
cd0c253
Merge branch 'master' into jerrad/NavView-hookup
Feb 13, 2018
c5f0738
Don't need this anymore
Feb 13, 2018
ff166b9
Fixing status view weirdness
Feb 13, 2018
35a21bf
Fixing issue where (rarely) SDK can crash on reroute
Feb 14, 2018
a816019
Fixing appearance issue with Resume button
Feb 15, 2018
813d7b6
Merge branch 'master' into jerrad/NavView-hookup
Feb 15, 2018
2ea8395
Fixing issue where next banner label text colors were not being set c…
Feb 15, 2018
105d1a7
StatusView clean up
Feb 15, 2018
5ad36db
Fixing issue where `wayNameLabel` was waiting until the end of pan an…
Feb 15, 2018
b14321b
Fixing issue where the `userCourseView`'s transform was being animate…
Feb 15, 2018
d3e6f0e
fix orphaned code warning
Feb 15, 2018
60f2d4e
Fixing issue where `ViewController.mapView` was nil after returning f…
Feb 15, 2018
bac044d
Pulling off appearance proxy property into appropriate class
Feb 16, 2018
40ac8de
using `normalTextColor` and fixing appearance calls that did not call…
Feb 16, 2018
f48075b
adding missing embed lifecycle methods
Feb 16, 2018
9e50721
Preventing style application from happening at first load
Feb 19, 2018
54e3618
Merge branch 'master' into jerrad/NavView-hookup
Feb 19, 2018
b64c76b
Fixing styling issues. All components except for `wayNameLabel` are n…
Feb 19, 2018
59c2494
Fixing issue where changing interface orientation whilst navigating c…
Feb 19, 2018
bd926d3
Fixing issue where there would be a constraints conflict when the flo…
Feb 19, 2018
8a73822
Fix merge issue
frederoni Feb 20, 2018
3272a5c
Fix strong ref cycle
frederoni Feb 20, 2018
86266e0
Fixing issue where both constraints and insets were taking banners in…
Feb 20, 2018
b725c62
Fixing issue where the FeedbackViewController could become improperly…
Feb 21, 2018
30b3f99
Rebuilding `WayNameView`
Feb 21, 2018
cc8f6b3
Fixing issue with User Anchor Point
Feb 21, 2018
0652574
Fixing issue where the Status View would still be visible at the top …
Feb 22, 2018
9e3a858
Fixing issue where items in the `informationStackView` would look won…
Feb 22, 2018
3687e74
Merge branch 'master' into jerrad/NavView-hookup
Feb 22, 2018
cd94b3c
Fixing issue where it was late in the day and Jerrad's brain was fried.
Feb 22, 2018
3d54668
Fixing issue where the `StatusView` can misbehave on iPhone X
Feb 22, 2018
2600685
Adding class constants for `FeedbackViewController`
Feb 23, 2018
221a8e6
Adding constant for mapView insets on example
Feb 23, 2018
219e1ac
Cleaning up force-unwrap of gesture recognizers
Feb 23, 2018
fe3bc05
Moving a whole bunch of magic values into constants
Feb 23, 2018
f2cd852
Break this into new line
Feb 23, 2018
8af5175
Fixing issue where FeedbackViewController wasn't taking iPhone X safe…
Feb 23, 2018
c08faa4
Merge branch 'master' into jerrad/NavView-hookup
Feb 23, 2018
8328ad0
Using a struct as a namespacing concept is an anti-pattern. Use casel…
Feb 23, 2018
0650ae3
Adding missing StatusView property
Feb 23, 2018
3ffc591
Fixing issue where steps table view would show up in front of the ins…
Feb 23, 2018
e9f8ac0
Fixing issue where compiler was getting confused between the name of …
Feb 23, 2018
895e3cc
Fixing mistake in view height logic.
Feb 24, 2018
e6fd8f4
Fixing merge clobbers
Feb 26, 2018
0c2189e
Fixing Snapshot Tests
Feb 26, 2018
7277b64
de-globalizing sourceOptions
Feb 26, 2018
eb7e214
remove comment
Feb 26, 2018
c586760
remove unused func
Feb 26, 2018
f0aa930
Update CHANGELOG.md
JThramer Feb 26, 2018
76b6c15
Updating for new delegate signature
Feb 26, 2018
b55be1e
Fixing tests to run properly on Bitrise
Feb 26, 2018
15a5c66
This is getting tedious. (Still fixing bitrise)
Feb 26, 2018
ec7d6bd
Removing unneeded images.
Feb 27, 2018
e677fda
Fixing issue where unexpected behavior was being caused by a storyboa…
Feb 27, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Changes to the Mapbox Navigation SDK for iOS

## v0.15.0 (tbd)

#### Breaking Changes
* `NavigationMapViewDelegate` and `RouteMapViewControllerDelegate`: `navigationMapView(_:didTap:)` is now `navigationMapView(_:didSelect:)` [#1063](https://github.com/mapbox/mapbox-navigation-ios/pull/1063)

## v0.14.0 (February 22, 2018)

#### Breaking Changes
Expand Down
49 changes: 33 additions & 16 deletions Examples/Swift/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ enum ExampleMode {

class ViewController: UIViewController, MGLMapViewDelegate, CLLocationManagerDelegate, VoiceControllerDelegate {

// MARK: - Class Constants
static let mapInsets = UIEdgeInsets(top: 25, left: 25, bottom: 25, right: 25)

// MARK: - IBOutlets
@IBOutlet weak var longPressHintView: UIView!

Expand Down Expand Up @@ -91,8 +94,6 @@ class ViewController: UIViewController, MGLMapViewDelegate, CLLocationManagerDel
simulationButton.isSelected = true
startButton.isEnabled = false

setupMapView()

alertController = UIAlertController(title: "Start Navigation", message: "Select the navigation type", preferredStyle: .actionSheet)
alertController.addAction(UIAlertAction(title: "Default UI", style: .default, handler: { (action) in
self.startBasicNavigation()
Expand Down Expand Up @@ -120,8 +121,14 @@ class ViewController: UIViewController, MGLMapViewDelegate, CLLocationManagerDel
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)

// Reset the navigation styling to the defaults
DayStyle().apply()
//Reload the mapView.
setupMapView()

// Reset the navigation styling to the defaults if we are returning from a presentation.
if (presentedViewController != nil) {
DayStyle().apply()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the right way to reset styling to the defaults is use a styleManager and probably call timeOfDayChanged()... right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach won't work because the ViewController will always show a DayStyle theme, regardless of the time-of-day.

In reality, the call isn't strictly necessary because the only thing the DayStyle does that affects the ViewController is that it changes the style of the status bar, a thing we could do directly. But I digress.

}

}

// MARK: Gesture Recognizer Handlers
Expand Down Expand Up @@ -298,21 +305,32 @@ class ViewController: UIViewController, MGLMapViewDelegate, CLLocationManagerDel
}

func setupMapView() {
guard mapView == nil else { return }
mapView = NavigationMapView(frame: view.bounds)
guard self.mapView == nil else { return }
let mapView = NavigationMapView(frame: view.bounds)
self.mapView = mapView
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe if we're explicitly dictating self.mapView and mapView we should probably use a different approach here right?
Like so:

guard mapView == nil else { return }
mapView = NavigationMapView(frame: view.bounds)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's actually a reason for this pattern -- self.mapView is an optional, but since we can guarantee it's existence (because we created it), we use the local reference. It's cleaner than using force-unwraps.


mapView!.autoresizingMask = [.flexibleWidth, .flexibleHeight]
mapView!.delegate = self
mapView!.navigationMapDelegate = self
mapView!.userTrackingMode = .follow
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
mapView.delegate = self
mapView.navigationMapDelegate = self
mapView.userTrackingMode = .follow
let bottomPadding = (view.frame.height + view.frame.origin.y) - bottomBar.frame.origin.y

view.insertSubview(mapView!, belowSubview: bottomBar)
var topPadding: CGFloat = 0.0
if #available(iOS 11.0, *) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a convenient safeTopAnchor in an extension on UIView. Can we make use of that instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is setting up the map inset, not an auto layout constraint.

Copy link
Contributor Author

@JThramer JThramer Feb 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Try and see if this can be done better with Storyboarding on ViewController (it can't)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still actionable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bsudekum @frederoni Looked into this -- bringing the creation of the mapView into storyboard doesn't look like a good idea right now, as the storyboard will likely keep a reference to it while the navigation scene is presented. There may be ways to get around this, but it's non-trivial enough to look out-of-scope for this PR.

topPadding = view.safeAreaInsets.top
} else if let navCon = navigationController {
topPadding = navCon.navigationBar.frame.size.height
}

let subviewMask = UIEdgeInsets(top: topPadding, left: 0, bottom: bottomPadding, right: 0)
mapView.contentInset = ViewController.mapInsets + subviewMask

view.insertSubview(mapView, belowSubview: bottomBar)

let singleTap = UILongPressGestureRecognizer(target: self, action: #selector(didLongPress(tap:)))
for recognizer in mapView!.gestureRecognizers! where recognizer is UILongPressGestureRecognizer {
singleTap.require(toFail: recognizer)
}
mapView!.addGestureRecognizer(singleTap)
mapView.gestureRecognizers?.filter({ $0 is UILongPressGestureRecognizer }).forEach(singleTap.require(toFail:))
mapView.addGestureRecognizer(singleTap)

}

func mapView(_ mapView: MGLMapView, didFinishLoading style: MGLStyle) {
Expand Down Expand Up @@ -414,7 +432,6 @@ extension ViewController: NavigationViewControllerDelegate {
// Called when the user hits the exit button.
// If implemented, you are responsible for also dismissing the UI.
func navigationViewControllerDidCancelNavigation(_ navigationViewController: NavigationViewController) {
setupMapView()
navigationViewController.dismiss(animated: true, completion: nil)
}
}
Expand Down
22 changes: 16 additions & 6 deletions MapboxNavigation.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
35A5413B1EFC052700E49846 /* RouteOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35A5413A1EFC052700E49846 /* RouteOptions.swift */; };
35B1E2951F1FF8EC00A13D32 /* UserCourseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35B1E2941F1FF8EC00A13D32 /* UserCourseView.swift */; };
35B5A47E1FFFDCE5000A3C8D /* NavigationViewLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35B5A47D1FFFDCE5000A3C8D /* NavigationViewLayout.swift */; };
35B711D21E5E7AD2001EDA8D /* MapboxNavigationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35B711D11E5E7AD2001EDA8D /* MapboxNavigationTests.swift */; };
35B711D41E5E7AD2001EDA8D /* MapboxNavigation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 351BEBD71E5BCC28006FE110 /* MapboxNavigation.framework */; };
35B7837E1F9547B300291F9A /* Transitioning.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35B7837D1F9547B300291F9A /* Transitioning.swift */; };
35B839491E2E3D5D0045A868 /* MBRouteController.m in Sources */ = {isa = PBXBuildFile; fileRef = 35B839481E2E3D5D0045A868 /* MBRouteController.m */; };
Expand Down Expand Up @@ -136,7 +135,11 @@
3EA93A1FEFDDB709DE84BED9 /* ImageRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EA938BE5468824787100228 /* ImageRepository.swift */; };
6441B16A1EFC64E50076499F /* WaypointConfirmationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6441B1691EFC64E50076499F /* WaypointConfirmationViewController.swift */; };
64847A041F04629D003F3A69 /* Feedback.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64847A031F04629D003F3A69 /* Feedback.swift */; };
8D24A2F62040960C0098CBF8 /* UIEdgeInsets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D24A2F52040960C0098CBF8 /* UIEdgeInsets.swift */; };
8D24A2F820409A890098CBF8 /* CGSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D24A2F720409A890098CBF8 /* CGSize.swift */; };
8D24A2FA20449B430098CBF8 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D24A2F920449B430098CBF8 /* Dictionary.swift */; };
8D391CE21FD71E78006BB91F /* Waypoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D391CE11FD71E78006BB91F /* Waypoint.swift */; };
8DB45E90201698EB001EA6A3 /* UIStackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DB45E8F201698EB001EA6A3 /* UIStackView.swift */; };
8DB63A3A1FBBCA2200928389 /* RatingControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DB63A391FBBCA2200928389 /* RatingControl.swift */; };
8DE879661FBB9980002F06C0 /* EndOfRouteViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DE879651FBB9980002F06C0 /* EndOfRouteViewController.swift */; };
8DF399B21FB257B30034904C /* UIGestureRecognizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DF399B11FB257B30034904C /* UIGestureRecognizer.swift */; };
Expand Down Expand Up @@ -167,7 +170,6 @@
C58822001FB0F0D7008B0A2D /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = C58821FF1FB0F0D7008B0A2D /* Error.swift */; };
C588C3C21F33882100520EF2 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35BF8CA31F28EBD8003F6125 /* String.swift */; };
C58D6BAD1DDCF2AE00387F53 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = C58D6BAC1DDCF2AE00387F53 /* Constants.swift */; };
C59094C5203E400A00EB2417 /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = C59094C4203E400A00EB2417 /* Dictionary.swift */; };
C5A6B2DD1F4CE8E8004260EA /* StyleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5A6B2DC1F4CE8E8004260EA /* StyleType.swift */; };
C5A6B2DE1F4DE57E004260EA /* Solar.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C57607B01F4CC97D00C27423 /* Solar.framework */; };
C5A6B2DF1F4DE57E004260EA /* Solar.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C57607B01F4CC97D00C27423 /* Solar.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
Expand Down Expand Up @@ -454,7 +456,11 @@
3EA938BE5468824787100228 /* ImageRepository.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageRepository.swift; sourceTree = "<group>"; };
6441B1691EFC64E50076499F /* WaypointConfirmationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WaypointConfirmationViewController.swift; sourceTree = "<group>"; };
64847A031F04629D003F3A69 /* Feedback.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Feedback.swift; sourceTree = "<group>"; };
8D24A2F52040960C0098CBF8 /* UIEdgeInsets.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIEdgeInsets.swift; sourceTree = "<group>"; };
8D24A2F720409A890098CBF8 /* CGSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CGSize.swift; sourceTree = "<group>"; };
8D24A2F920449B430098CBF8 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = "<group>"; };
8D391CE11FD71E78006BB91F /* Waypoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Waypoint.swift; sourceTree = "<group>"; };
8DB45E8F201698EB001EA6A3 /* UIStackView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIStackView.swift; sourceTree = "<group>"; };
8DB63A391FBBCA2200928389 /* RatingControl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RatingControl.swift; sourceTree = "<group>"; };
8DE879651FBB9980002F06C0 /* EndOfRouteViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EndOfRouteViewController.swift; sourceTree = "<group>"; };
8DF399B11FB257B30034904C /* UIGestureRecognizer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIGestureRecognizer.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -486,7 +492,6 @@
C582FD5E203626E900A9086E /* CLLocationDirection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CLLocationDirection.swift; sourceTree = "<group>"; };
C58821FF1FB0F0D7008B0A2D /* Error.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Error.swift; sourceTree = "<group>"; };
C58D6BAC1DDCF2AE00387F53 /* Constants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
C59094C4203E400A00EB2417 /* Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = "<group>"; };
C5A6B2DC1F4CE8E8004260EA /* StyleType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StyleType.swift; sourceTree = "<group>"; };
C5A7EC5B1FD610A80008B9BA /* VisualInstructionComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VisualInstructionComponent.swift; sourceTree = "<group>"; };
C5A9DDBD202E12EE007D52DA /* MapboxSpeech.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapboxSpeech.framework; path = Carthage/Build/iOS/MapboxSpeech.framework; sourceTree = "<group>"; };
Expand Down Expand Up @@ -886,14 +891,17 @@
children = (
C5000A921EC25C6E00563EA9 /* Abbreviations.swift */,
351BEC081E5BCC72006FE110 /* Bundle.swift */,
C59094C4203E400A00EB2417 /* Dictionary.swift */,
8D24A2F920449B430098CBF8 /* Dictionary.swift */,
8D24A2F52040960C0098CBF8 /* UIEdgeInsets.swift */,
8DF399B11FB257B30034904C /* UIGestureRecognizer.swift */,
351BEC041E5BCC6C006FE110 /* ManeuverDirection.swift */,
351BEBDF1E5BCC63006FE110 /* MGLMapView.swift */,
35D825F91E6A2DBE0088F83B /* MGLMapView+MGLNavigationAdditions.h */,
35D825FA1E6A2DBE0088F83B /* MGLMapView+MGLNavigationAdditions.m */,
C58159001EA6D02700FC6C3D /* MGLVectorSource.swift */,
351BEBF01E5BCC63006FE110 /* UIView.swift */,
8D24A2F720409A890098CBF8 /* CGSize.swift */,
8DB45E8F201698EB001EA6A3 /* UIStackView.swift */,
35CF34B01F0A733200C2692E /* UIFont.swift */,
35B7837D1F9547B300291F9A /* Transitioning.swift */,
359D283B1F9DC14F00FDE9C9 /* UICollectionView.swift */,
Expand Down Expand Up @@ -1523,6 +1531,8 @@
C5000A931EC25C6E00563EA9 /* Abbreviations.swift in Sources */,
C58822001FB0F0D7008B0A2D /* Error.swift in Sources */,
35C9973F1E732C1B00544D1C /* RouteVoiceController.swift in Sources */,
8D24A2FA20449B430098CBF8 /* Dictionary.swift in Sources */,
8DB45E90201698EB001EA6A3 /* UIStackView.swift in Sources */,
351BEBFC1E5BCC63006FE110 /* NavigationViewController.swift in Sources */,
35E407681F5625FF00EFC814 /* StyleKitMarker.swift in Sources */,
C588C3C21F33882100520EF2 /* String.swift in Sources */,
Expand All @@ -1537,11 +1547,11 @@
35DC9D911F4323AA001ECD64 /* LanesView.swift in Sources */,
359D1B281FFE70D30052FA42 /* NavigationView.swift in Sources */,
8DE879661FBB9980002F06C0 /* EndOfRouteViewController.swift in Sources */,
8D24A2F62040960C0098CBF8 /* UIEdgeInsets.swift in Sources */,
DADAD82F20350849002E25CA /* MBRouteVoiceController.m in Sources */,
C57491DF1FACC42F006F97BC /* CGPoint.swift in Sources */,
C58159011EA6D02700FC6C3D /* MGLVectorSource.swift in Sources */,
351BEC011E5BCC63006FE110 /* ManeuverView.swift in Sources */,
C59094C5203E400A00EB2417 /* Dictionary.swift in Sources */,
35B1E2951F1FF8EC00A13D32 /* UserCourseView.swift in Sources */,
35B5A47E1FFFDCE5000A3C8D /* NavigationViewLayout.swift in Sources */,
3531C2701F9E095400D92F9A /* InstructionsBannerView.swift in Sources */,
Expand All @@ -1559,6 +1569,7 @@
35CF34B11F0A733200C2692E /* UIFont.swift in Sources */,
C51DF8671F38C337006C6A15 /* Date.swift in Sources */,
359D283C1F9DC14F00FDE9C9 /* UICollectionView.swift in Sources */,
8D24A2F820409A890098CBF8 /* CGSize.swift in Sources */,
35CB1E131F97DD740011CC44 /* FeedbackItem.swift in Sources */,
35F611C41F1E1C0500C43249 /* FeedbackViewController.swift in Sources */,
353AA5601FCEF583009F0384 /* StyleManager.swift in Sources */,
Expand Down Expand Up @@ -1624,7 +1635,6 @@
16E3625C201265D600DF0592 /* TestImageDownloadOperation.swift in Sources */,
1662244B2029059C00EA4824 /* ImageCacheTests.swift in Sources */,
3510300F1F54B67000E3B7E7 /* LaneTests.swift in Sources */,
35B711D21E5E7AD2001EDA8D /* MapboxNavigationTests.swift in Sources */,
352690491ECC843700E387BD /* Fixture.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,6 @@
ReferencedContainer = "container:MapboxNavigation.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "OS_ACTIVITY_MODE"
value = "disable"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
Expand Down
14 changes: 14 additions & 0 deletions MapboxNavigation/CGSize.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Foundation
import UIKit

extension CGSize: ExpressibleByFloatLiteral {
public typealias FloatLiteralType = Double

public init(size: Double) {
self.init(width: size, height: size)
}

public init(floatLiteral value: FloatLiteralType) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these need to be public?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type alias 'FloatLiteralType' must be declared public because it matches a requirement in public protocol 'ExpressibleByFloatLiteral'

Initializer 'init(floatLiteral:)' must be declared public because it matches a requirement in public protocol 'ExpressibleByFloatLiteral'

self.init(size: value)
}
}
Loading