         return self
     }
     
-    public var nk_topViewController: UIViewController? {
+    @objc public var nk_topViewController: UIViewController? {
         var viewController: UIViewController? = self
         while viewController?.presentedViewController != nil {
             viewController = viewController?.presentedViewController

        return self.parent?.nk_nearestNavigationController
    }
    
    public var nk_visibleViewController: UIViewController? {
        if let navigationController = self as? UINavigationController {
            return navigationController.visibleViewController?.nk_visibleViewController
        }

import UIKit

public extension UIViewController {
    @objc public var nk_nearestNavigationController: UINavigationController? {
        if let navigationController = self as? UINavigationController {
            return navigationController
        }
