encode(_:forKey:)
Encodes size information and associates it with the specified key in the coder’s archive.
Declaration
func encode(_ size: CGSize, forKey key: String)Parameters
- size:
The size information 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 decodeCGSize(forKey:) method to retrieve the data.