TableSearch/APLDetailViewController.m

 
/*
 Copyright (C) 2013-2015 Apple Inc. All Rights Reserved.
 See LICENSE.txt for this sample’s licensing information
 
 Abstract:
 Detail view controller for the application. Implemented to support state restoration.
 */
 
#import "APLDetailViewController.h"
 
@implementation APLDetailViewController
 
static NSString *ProductTitleKey = @"ProductTitleKey";
 
 
- (void) encodeRestorableStateWithCoder:(NSCoder *)coder
{
    [super encodeRestorableStateWithCoder:coder];
    [coder encodeObject:self.title forKey:ProductTitleKey];
}
 
 
- (void) decodeRestorableStateWithCoder:(NSCoder *)coder
{
    [super decodeRestorableStateWithCoder:coder];
    self.title = [coder decodeObjectForKey:ProductTitleKey];
}
 
 
@end