How do I decode and encode int variables in Objective-C?
This is what I have done so far, but application is terminating at that point.
Whats the mistake here?
-(void)encodeWithCoder:(NSCoder*)coder
{
[coder encodeInt:count forKey:@"Count"];
}
-(id)initWithCoder:(NSCoder*)decoder
{
[[decoder decodeIntForKey:@"Count"]copy];
return self;
}