Contents

encode(_:forKey:)

Encodes vector data and associates it with the specified key in the coder’s archive.

Declaration

func encode(_ vector: CGVector, forKey key: String)

Parameters

  • vector:

    The vector data to encode.

  • key:

    The key identifying the data.

Discussion

When decoding the data from the archive, you pass the value in the key parameter to the corresponding decodeCGVector(forKey:) method to retrieve the data.

See Also

Related Documentation

Encoding Geometry-Based Data