Created
February 28, 2014 07:08
-
-
Save abbood/9266666 to your computer and use it in GitHub Desktop.
primitive accessor methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// News.m | |
// | |
// | |
// Created by Abdullah Bakhach on 12/5/13. | |
// | |
// | |
#import "News.h" | |
#import "NSString+Addons.h" | |
@implementation News | |
@dynamic caption; | |
@dynamic news_details; | |
@dynamic news_id; | |
@dynamic news_photo; | |
@dynamic news_title; | |
@dynamic timeStamp; | |
@dynamic news_snippet; | |
-(void)setNews_details:(NSString *)news_details { | |
[self willChangeValueForKey:@"news_snippet"]; | |
[self setPrimitiveNews_details:news_details]; | |
[self didChangeValueForKey:@"news_snippet"]; | |
[self setNews_snippet:news_details]; | |
} | |
- (void)setNews_snippet:(NSString *)newNews_snippet { | |
[self willChangeValueForKey:@"news_snippet"]; | |
[self setPrimitiveNews_snippet:[newNews_snippet flattenHTML]]; | |
[self didChangeValueForKey:@"news_snippet"]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment