 import Foundation
 import UIKit
 
-public class Navigation : NSObject {
+public class Navigation {
     public var willNavigate: PresentationWillShowHandler?
 
     private var collection: NavigationCollection

        }
    }

    @objc(navigate:context:fromControl:)
    public func navigate(name: String, context: AnyObject, sender: UIControl) {
        if let route = self.collection.routes[name] {
            self.navigate(NavigationContext.init(context: context, route: route, source: sender))

            return
        }
    }

    // URL routing is not available yet
//    @objc(navigateURL:sender:)
//    public func navigate(url: NSURL, sender: UIViewController) {
//    }

    private func navigate(context: NavigationContext) {
        context.traitCollection = UIApplication.sharedApplication().keyWindow!.traitCollection

        self.collection = collection
    }

        if let route = self.collection.routes[name] {
    public func navigate(_ name: String, context: Any, sender: UIViewController) {
            self.navigate(NavigationContext.init(context: context, route: route, source: sender))

            return
        }
    }

    public func navigate(_ name: String, context: AnyObject, sender: UIControl) {
        if let route = self.collection.routes[name] {
            self.navigate(NavigationContext.init(context: context, route: route, source: sender))

