DKItemType
public enum DKItemType : String, CaseIterable
High-level item representations handled by Dropmark. Item types are expressed as strings, and are thus comparable and printable. Item types, Universal Type Identifers, MIMEs, and file extensions are tightly integrated in the Dropmark SDK.
-
Represents a data file such as a JPEG, PNG, or HEIC image.
Declaration
Swift
case image
-
Represents a data file such as a MPEG, MP4, or MOV video.
Declaration
Swift
case video
-
Represents a data file such as a MP3, AAC, or WAV audio file.
Declaration
Swift
case audio
-
Represents a string conforming to a URL scheme.
Declaration
Swift
case link
-
Represents a string (potentially formatted with Markdown)
Declaration
Swift
case text
-
Represents a hex color string.
Declaration
Swift
case color
-
Special case item that behaves as a parent to other items.
Declaration
Swift
case stack
-
An item not conforming to any of the other item types. Oftentimes this is a data file in a proprietary format, such as a Sketch or Photoshop file.
Declaration
Swift
case other
-
Derive a Dropmark item type from a file’s MIME type (such as “image/jpeg”).
Declaration
Swift
public init?(mimeType: String)
Parameters
mimeType
The MIME type of the item’s associated file
Return Value
A Dropmark item type
-
Derive a Dropmark item type from a filename extension (like “jpg”).
Declaration
Swift
public init?(filenameExtension: String)
Parameters
filenameExtension
The filename extension of the item’s associated file
Return Value
A Dropmark item type
-
String useful for displaying an item type on screen. Returns a capitalized version of the case value, except for
.other
, which returns “File”Declaration
Swift
public var displayTitle: String { get }