How to get reference to self.view and self.view.frame in NativeScript
<p>I am trying to call the UIPrinterPickerController in NativeScript on an iPad. I've tracked down the call that I need to make and it is here:</p>

<pre><code>UIPrinterPickerController.presentFromRectInViewAnimatedCompletionHandler(rect: CGRect, view: UIView, animated: boolean, completion: (arg1: UIPrinterPickerController, arg2: boolean, arg3: NSError) =&gt; void): boolean;
</code></pre>

<p>In the examples I've seen the <code>rect</code> param is a reference to <code>self.view.frame</code> and the <code>view</code> param is a reference to <code>self.view</code>. How do I find those references in NativeScript? I've tried the <code>ui.view</code> module and that doesn't work. I've tried <code>args.object</code> from the <code>pageLoaded</code> event and that doesn't work. Any help would be appreciated.</p>

<pre><code>// My code here
if ( ! UIDevice.currentDevice().userInterfaceIdiom == UIUserInterfaceIdiomPad) {
    found = printPicker.presentAnimatedCompletionHandler(false, completionHandler);
} else {
    found = printPicker.presentFromRectInViewAnimatedCompletionHandler(view.frame, view, false, completionHandler);
}
</code></pre>