Encodes an affine transform and associates it with the specified key in the receiver’s archive.
SDKs
- iOS 2.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- UIKit
Declaration
func encode(_ transform: CGAffine Transform, forKey key: String)
Parameters
transform
The transform 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 decode
method to retrieve the data.