Returns whether UIKit can print the file referenced by a URL.
SDKs
- iOS 4.2+
- Mac Catalyst 13.0+
Framework
- UIKit
Declaration
Parameters
url
An object representing a URL. Valid
NSURL
objects must use thefile:
orassets-library:
scheme or any scheme that can return anNSData
object with a registered protocol. The file referenced by the URL must contain PDF data or an image in a format supported by the Image I/O framework. See View Programming Guide for iOS in View Programming Guide for iOS for a list of the supported image formats.
Return Value
true
if UIKit can print the contents of the referenced file, otherwise false
. The method returns false
if url
references PDF data that specifies that printing is not allowed.
Discussion
You should call this method to test the data referenced by a URL prior to assigning that URL to printing
or printing
.