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

Make Voice and Visual Instructions open #216

Merged
merged 3 commits into from
Dec 4, 2017
Merged

Make Voice and Visual Instructions open #216

merged 3 commits into from
Dec 4, 2017

Conversation

bsudekum
Copy link

@bsudekum bsudekum commented Dec 1, 2017

This PR aims to make the classes VisualInstruction et al and SpokenInstruction open and provide public initializers to make testing easier.

Also added a few missing @objc.

/cc @mapbox/navigation-ios

@bsudekum bsudekum requested a review from 1ec5 December 1, 2017 21:52
text = json["announcement"] as! String
ssmlText = json["ssmlAnnouncement"] as! String
/**
Initialize a `SpokenInStruction` from a dictionary.
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: SpokenInstruction (×2).

:nodoc:
Initialize A `VisualInstructionComponent`.
*/
@objc public init(text: String?, imageURL: URL?) {
Copy link
Contributor

Choose a reason for hiding this comment

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

In the future, as we add additional fields to the component object, if we find that the number of arguments gets unwieldy, we can make the properties var instead and leave them out of the initializer.

@bsudekum bsudekum merged commit 07ca787 into master Dec 4, 2017
@bsudekum bsudekum deleted the open branch December 4, 2017 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants