javascript - How to access the UIPrintInteractionController class with NativeScript -


i'm trying implement airprint printing , need instantiate uiprintinteractioncontroller. however, can't seem find class. how can access uikit class nativescript?

function findprinter() {     var printcontroller = uiprintinteractioncontroller.new();     console.log(printcontroller); } exports.findprinter = findprinter; 

use following syntax case :

function findprinter() {     var printcontroller = uiprintinteractioncontroller;     console.log(printcontroller.isprintingavailable()); } exports.findprinter = findprinter; 

here more example objective-c js based on {n} documenation

objective-c code

nsmutablearray * array = [[nsmutablearray alloc] init]; class buttonclass = [uibutton class]; uibutton * button = [[buttonclass alloc] init]; [array setobject: buttonclass atindex: 0]; [array setobject: button atindex: 1]; 

nativescript code

var array = new nsmutablearray(); var buttonclass = uibutton; var button = new buttonclass(); array.setobjectatindex(buttonclass, 0); array.setobjectadindex(button, 1); 

more details can found @ nativescript documentation


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -