DKTag
@objc(DKTag)
public final class DKTag : NSObject, NSCoding, DKResponseObjectSerializable, DKResponseListSerializable
Tags are added to items and are a great way to organize items across many collections.
-
The name of the tag. Possibly contains a “#” character
Declaration
Swift
public var name: String
-
The total number of items the tag is applied to
Declaration
Swift
public var itemsTotalCount: NSNumber?
-
Initialize a tag using a name string.
Declaration
Swift
public init(name: String)
Parameters
name
The unique string to identify a tag
-
Serializes a new instance from the provided network response and key-value representation. The representation is validated for the required parameters, then fills in optional parameters as necessary.
Declaration
Swift
public init?(response: HTTPURLResponse, representation: Any)
Parameters
response
A network response assocated with serialization
representation
A key-value object representing parameters and child objects.
-
Returns an object initialized from data in a given unarchiver.
Discussion: You typically return
self
frominit(coder:)
. If you have an advanced need that requires substituting a different object after decoding, you can do so inawakeAfter(using:)
.
Declaration
Swift
public required init?(coder aDecoder: NSCoder)
Parameters
coder
An unarchiver object.
Return Value
self
, initialized using the data incoder
. -
Encodes the receiver using a given archiver.
Declaration
Swift
public func encode(with aCoder: NSCoder)
Parameters
encoder
An archiver object.