Open Instance Methodswift 6.0.3Foundation
encode(with:)
func encode(with aCoder: NSCoder)
func encode(with aCoder: NSCoder)
s10Foundation14NSNotificationC6encode4withyAA7NSCoderC_tF
What are these?9D9NJ
import Foundation
class NSNotification
class NSCoder
The NSCoder
abstract class declares the interface used by concrete subclasses to transfer objects and other values between memory and some other format. This capability provides the basis for archiving (where objects and data items are stored on disk) and distribution (where objects and data items are copied between different processes or threads). The concrete subclasses provided by Foundation for these purposes are NSKeyedArchiver
and NSKeyedUnarchiver
. Concrete subclasses of NSCoder
are referred to in general as coder classes, and instances of these classes as coder objects (or simply coders). A coder object that can only encode values is referred to as an encoder object, and one that can only decode values as a decoder object.
override convenience init()
required convenience init?(coder aDecoder: NSCoder)
init(name: NSNotification.Name, object: Any?, userInfo: [AnyHashable : Any]? = nil)
override var description: String { get }
var name: NSNotification.Name { get }
var object: Any? { get }
var userInfo: [AnyHashable : Any]? { get }
override func copy() -> Any
func copy(with zone: NSZone? = nil) -> Any
struct Name