NSCoder UIKit Additions Reference
| Framework | /System/Library/Frameworks/UIKit.framework |
| Availability | Available in iOS 2.0 and later. |
| Declared in | UIGeometry.h |
Overview
This category adds methods to the Foundation framework’s NSCoder class. The methods in this category let you encode and decode geometry-based data used by the UIKit framework.
Tasks
Encoding Data
-
– encodeCGPoint:forKey: -
– encodeCGRect:forKey: -
– encodeCGSize:forKey: -
– encodeCGAffineTransform:forKey: -
– encodeUIEdgeInsets:forKey: -
– encodeUIOffset:forKey:
Decoding Data
Instance Methods
decodeCGAffineTransformForKey:
Decodes and returns the CGAffineTransform structure associated with the specified key in the receiver’s archive.
Parameters
- key
The key that identifies the affine transform.
Return Value
The affine transform.
Discussion
Use this method to decode size information that was previously encoded using the encodeCGAffineTransform:forKey: method.
Availability
- Available in iOS 2.0 and later.
See Also
Declared In
UIGeometry.hdecodeCGPointForKey:
Decodes and returns the CGPoint structure associated with the specified key in the receiver’s archive.
Parameters
- key
The key that identifies the point.
Return Value
The CGPoint structure.
Discussion
Use this method to decode a point that was previously encoded using the encodeCGPoint:forKey: method.
Availability
- Available in iOS 2.0 and later.
See Also
Declared In
UIGeometry.hdecodeCGRectForKey:
Decodes and returns the CGRect structure associated with the specified key in the receiver’s archive.
Parameters
- key
The key that identifies the rectangle.
Return Value
The CGRect structure.
Discussion
Use this method to decode a rectangle that was previously encoded using the encodeCGRect:forKey: method.
Availability
- Available in iOS 2.0 and later.
See Also
Declared In
UIGeometry.hdecodeCGSizeForKey:
Decodes and returns the CGSize structure associated with the specified key in the receiver’s archive.
Parameters
- key
The key that identifies the size information.
Return Value
The CGSize structure.
Discussion
Use this method to decode size information that was previously encoded using the encodeCGSize:forKey: method.
Availability
- Available in iOS 2.0 and later.
See Also
Declared In
UIGeometry.hdecodeUIEdgeInsetsForKey:
Decodes and returns the UIEdgeInsets structure associated with the specified key in the receiver’s archive.
Parameters
- key
The key that identifies the edge insets.
Return Value
The edge insets data.
Discussion
Use this method to decode size information that was previously encoded using the encodeUIEdgeInsets:forKey: method.
Availability
- Available in iOS 2.0 and later.
See Also
Declared In
UIGeometry.hdecodeUIOffsetForKey:
Decodes and returns the UIOffset structure associated with the specified key in the receiver’s archive.
Parameters
- key
The key that identifies the offset.
Return Value
The offset data.
Discussion
Use this method to decode offset information that was previously encoded using the encodeUIOffset:forKey: method.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
UIGeometry.hencodeCGAffineTransform:forKey:
Encodes an affine transform and associates it with the specified key in the receiver’s archive.
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 decodeCGAffineTransformForKey: method to retrieve the data.
Availability
- Available in iOS 2.0 and later.
See Also
Declared In
UIGeometry.hencodeCGPoint:forKey:
Encodes a point and associates it with the specified key in the receiver’s archive.
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 decodeCGPointForKey: method to retrieve the data.
Availability
- Available in iOS 2.0 and later.
See Also
Declared In
UIGeometry.hencodeCGRect:forKey:
Encodes a rectangle and associates it with the specified key in the receiver’s archive.
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.
Availability
- Available in iOS 2.0 and later.
See Also
Declared In
UIGeometry.hencodeCGSize:forKey:
Encodes size information and associates it with the specified key in the receiver’s archive.
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 decodeCGSizeForKey: method to retrieve the data.
Availability
- Available in iOS 2.0 and later.
See Also
Declared In
UIGeometry.hencodeUIEdgeInsets:forKey:
Encodes edge inset data and associates it with the specified key in the receiver’s archive.
Parameters
- insets
The edge insets 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 decodeUIEdgeInsetsForKey: method to retrieve the data.
Availability
- Available in iOS 2.0 and later.
See Also
Declared In
UIGeometry.hencodeUIOffset:forKey:
Encodes offset data and associates it with the specified key in the receiver’s archive.
Parameters
- offset
The offset 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 decodeUIOffsetForKey: method to retrieve the data.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
UIGeometry.h© 2011 Apple Inc. All Rights Reserved. (Last updated: 2011-10-12)