Skip to content

Instantly share code, notes, and snippets.

@aronbalog
Created May 5, 2018 13:19
Show Gist options
  • Save aronbalog/e26231803416f6fbe0e7bc1cd432b886 to your computer and use it in GitHub Desktop.
Save aronbalog/e26231803416f6fbe0e7bc1cd432b886 to your computer and use it in GitHub Desktop.
import Foundation
import CoreNavigation
struct Color: Destination {
typealias ViewControllerType = ColorViewController
static func resolve(context: Context<ViewControllerType>) {
guard let rgbHexString = context.parameters?["color"] as? String else {
context.complete()
return
}
let color = UIColor(hexString: rgbHexString)
context.complete(data: color)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment