xydev
xydev

Reputation: 3409

How can I tell if an AirPrint printer is available?

I have an option to print in my iPhone app.

On pressing the 'Print' button, UIPrintInteractionController is presented. The issue is that I want to show an alert on pressing the print button if no printers are connected.

I tried several options like [UIPrintInteractionController canPrintData:dataFromPath] but these options never worked.

Upvotes: 0

Views: 823

Answers (1)

sosborn
sosborn

Reputation: 14694

From the docs:

if ([UIPrintInteractionController isPrintingAvailable]) {
  //Printing is OK
}
else {
  //Printing is not ok
}

Upvotes: 3

Related Questions