Skip to content

Instantly share code, notes, and snippets.

@tikidunpon
Created November 20, 2014 05:52
Show Gist options
  • Save tikidunpon/ce138f3d4cc12e820ac6 to your computer and use it in GitHub Desktop.
Save tikidunpon/ce138f3d4cc12e820ac6 to your computer and use it in GitHub Desktop.
Mantleでエンコード時の振る舞いを変えたい ref: http://qiita.com/tikidunponpon/items/98ce63c9ee3ab27f1b10
/**
* エンコードから除外したいプロパティを記載する
*/
+ (NSDictionary *)encodingBehaviorsByPropertyKey {
NSDictionary *excludeProperties = @{
NSStringFromSelector(@selector(keyChainStore)): @(MTLModelEncodingBehaviorExcluded)
};
NSDictionary *encodingBehaviors = [[super encodingBehaviorsByPropertyKey] mtl_dictionaryByAddingEntriesFromDictionary:excludeProperties];
return encodingBehaviors;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment