Encodes an array of the given Objective-C type, provided the number of items and a pointer.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The values are encoded from the buffer beginning at
item must contain exactly one type code.
NSCoder’s implementation invokes
encode to encode the entire array of items. Subclasses that implement the
encode method do not need to override this method.
This method must be matched by a subsequent
For information on creating an Objective-C type code suitable for
item, see Type Encodings.
You should not use this method to encode C arrays of Objective-C objects. See
decode for more details.