Contents

encode(_:forKey:)

Encodes a point and associates it with the specified key in the receiver’s archive.

Declaration

func encode(_ point: CGPoint, forKey key: String)

Parameters

  • point:

    The point 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 decodeCGPoint(forKey:) method to retrieve the data.

See Also

Related Documentation

Encoding Geometry-Based Data