Instance Method

encodeCGRect:forKey:

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

Declaration

- (void)encodeCGRect:(CGRect)rect forKey:(NSString *)key;

Parameters

rect

The rectangle 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 decodeCGRectForKey: method to retrieve the data.

See Also

Encoding Geometry-Based Data

- encodeCGAffineTransform:forKey:

Encodes an affine transform and associates it with the specified key in the receiver’s archive.

- encodeCGPoint:forKey:

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

- encodeCGSize:forKey:

Encodes size information and associates it with the specified key in the coder’s archive.

- encodeCGVector:forKey:

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

- encodeDirectionalEdgeInsets:forKey:

Encodes directional edge inset data and associates it with the specified key in the coder’s archive.

- encodeUIEdgeInsets:forKey:

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

- encodeUIOffset:forKey:

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