Creates a new request for a thumbnail with the specified parameters for a file at a provided URL.
SDKs
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
Framework
- Quick
Look Thumbnailing
Declaration
- (instancetype)initWithFileAtURL:(NSURL *)url size:(CGSize)size scale:(CGFloat)scale representationTypes:(QLThumbnail Generation Request Representation Types)representationTypes;
Parameters
url
The URL of the file for which you want to create a thumbnail.
size
The desired size of the thumbnails.
scale
The scale of the thumbnails. This parameter usually represents the scale of the current screen. However, you can pass a screen scale to the initializer that isn’t the current device’s screen scale. For example, you can create thumbnails for different scales and upload them to a server in order to download them later on devices with a different screen scale.
representationTypes
The different thumbnail types. For a list of all possible thumbnail representation types, see
QLThumbnail
.Generation Request Representation Types
Return Value
An initialized request object to create a thumbnail for a file.