Slide 12
Slide 12 text
import Crossroad
class AppDelegate: UIApplicationDelegate {
let router: DefaultRouter = {
let router = DefaultRouter(scheme: "scheme")
router.register([
("scheme://search", { _ in return true }),
// ...
])
return router
}()
func application(_ app: UIApplication, open url: URL, options:
[UIApplicationOpenURLOptionsKey: Any]) -> Bool {
return router.openIfPossible(url, options: options)
}
}