AccessibilityUIExamples/CustomRotors/ElementView/CustomRotorsElementLoadingToken.swift
/* |
See LICENSE folder for this sample’s licensing information. |
Abstract: |
An item result with a given item loader and custom label. |
*/ |
import Cocoa |
class CustomRotorsElementLoadingToken: NSObject, NSCoding, NSSecureCoding { |
var uniqueIdentifier = "" |
init(identifier: String) { |
uniqueIdentifier = identifier |
} |
static var supportsSecureCoding: Bool { |
return true |
} |
required init(coder aDecoder: NSCoder) { |
super.init() |
if let identifier = aDecoder.decodeObject(of: NSString.self, forKey: "uniqueIdentifier") as String? { |
uniqueIdentifier = identifier |
} |
} |
func encode(with aCoder: NSCoder) { |
aCoder.encode(uniqueIdentifier, forKey: "uniqueIdentifier") |
} |
} |
Copyright © 2017 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2017-09-12