mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-04 16:12:58 +00:00
add CPCoding support to CPIndexPath
This commit is contained in:
1 parent
c317274a26
commit
97289d9070
1 file changed
+21
@@ -145,3 +145,24 @@
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
var CPIndexPathIndexesKey = @"CPIndexPathIndexes";
|
||||
|
||||
@implementation CPIndexPath (CPCoding)
|
||||
|
||||
- (id)initWithCoder:(CPCoder)theCoder
|
||||
{
|
||||
if (self = [self init])
|
||||
{
|
||||
_indexes = [theCoder decodeObjectForKey:CPIndexPathIndexesKey];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)encodeWithCoder:(CPCoder)theCoder
|
||||
{
|
||||
[theCoder encodeObject:_indexes forKey:CPIndexPathIndexesKey];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user