Created
May 5, 2018 13:19
-
-
Save aronbalog/e26231803416f6fbe0e7bc1cd432b886 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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