tgunr
tgunr

Reputation: 1548

How do you create a UTType for System Declared Uniform Type Identifiers for folder?

I see all kinds of examples for using a file or an extension but I am trying to call let imag = NSWorkspace.shared.icon(for: <#T##UTType#>) and I don't see any init method in UUType that takes a identifier e.g. folder.

Upvotes: 0

Views: 738

Answers (1)

Vadim Belyaev
Vadim Belyaev

Reputation: 2859

UTType is declared in the Uniform Type Identifiers framework.

All uou need to do is import UniformTypeIdentifiers and then you'll be able to write things like UTType.folder.

Upvotes: 3

Related Questions