How get visible / current viewcontroller in non-viewcontroller class? Swift
<p>I have information box object - "Info view". And I wanted to append this view to current VC view, sometimes directly in VC class sometimes outside VC class, ex. in my framework. </p>

<p>I don't want always pass current VC in method argument, like</p>

<pre><code>class InfoView: UIView {

    /* Initialization methods */

    func show(viewController: ViewController) {

       /* some code */

        viewController.addSubview(self)
    }
}
</code></pre>

<p>I want get current VC directly in my "Info view" class:</p>

<pre><code>class InfoView: UIView {

    /* Initialization methods */

    func show() {
        let viewController = /* need get current VC */

        /* some code */

        viewController.addSubview(self)
    }
}
</code></pre>

<p><code>rootViewController</code> property in <code>UIApplication.sharedApplication()</code> returns current VC, but after transitions this VC not changed. </p>

<p>How I can get need get current VC? </p>