Encodes a double-precision floating point value and associates it with the string key.
SDKs
- iOS 2.0+
- macOS 10.2+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Encodes a double-precision floating point value and associates it with the string key.
SDKs
Framework
func encode Array(of Obj CType: Unsafe Pointer<Int8>, count: Int, at: Unsafe Raw Pointer)
Encodes an array of the given Objective-C type, provided the number of items and a pointer.
func encode(Bool, for Key: String)
Encodes a Boolean value and associates it with the string key
.
func encode Bycopy Object(Any?)
An encoding method for subclasses to override such that it creates a copy, rather than a proxy, when decoded.
func encode Byref Object(Any?)
An encoding method for subclasses to override such that it creates a proxy, rather than a copy, when decoded.
func encode Bytes(Unsafe Raw Pointer?, length: Int)
Encodes a buffer of data of an unspecified type.
func encode Bytes(Unsafe Pointer<UInt8>?, length: Int, for Key: String)
Encodes a buffer of data, given its length and a pointer, and associates it with a string key.
func encode Conditional Object(Any?)
An encoding method for subclasses to override to conditionally encode an object, preserving common references to it.
func encode Conditional Object(Any?, for Key: String)
An encoding method for subclasses to override to conditionally encode an object, preserving common references to it, only if it has been unconditionally encoded.
func encode(Data)
Encodes a given data object.
func encode(Float, for Key: String)
Encodes a floating point value and associates it with the string key.
func encode CInt(Int32, for Key: String)
Encodes a C integer value and associates it with the string key.
func encode(Int, for Key: String)
Encodes an integer value and associates it with the string key.
func encode(Int32, for Key: String)
Encodes a 32-bit integer value and associates it with the string key.
func encode(Int64, for Key: String)
Encodes a 64-bit integer value and associates it with the string key.
func encode(Any?)
Encodes an object.
func encode(Any?, for Key: String)
Encodes an object and associates it with the string key.
func encode(NSPoint)
Encodes a point.
func encode(NSPoint, for Key: String)
Encodes a point and associates it with the string key.
func encode Property List(Any)
Encodes a property list.
func encode(NSRect)
Encodes a rectangle structure.
func encode(NSRect, for Key: String)
Encodes a rectangle structure and associates it with the string key.
func encode Root Object(Any)
An encoding method for subclasses to override to encode an interconnected group of objects, starting with the provided root object.
func encode(NSSize)
Encodes a size structure.
func encode(NSSize, for Key: String)
Encodes a size structure and associates it with the given string key.
func encode Value(of Obj CType: Unsafe Pointer<Int8>, at: Unsafe Raw Pointer)
Encodes a value of the given type at the given address.