-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPSRNote.m
More file actions
39 lines (30 loc) · 741 Bytes
/
PSRNote.m
File metadata and controls
39 lines (30 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
// PSRNote.m
// SimpleNotes
//
// Created by Daniil Korotin on 24.04.14.
// Copyright (c) 2014 Daniil Korotin. All rights reserved.
//
#import "PSRNote.h"
@implementation PSRNote
- (id)init {
self = [super init];
if (self) {
self.text = @"New note";
self.date = [NSDate date];
}
return self;
}
- (void)encodeWithCoder:(NSCoder *)coder {
[coder encodeObject:self.text forKey:@"text"];
[coder encodeObject:self.date forKey:@"date"];
}
- (id)initWithCoder:(NSCoder *)aDecoder {
self = [super init];
if (self) {
self.text = [aDecoder decodeObjectForKey:@"text"];
self.date = [aDecoder decodeObjectForKey:@"date"];
}
return self;
}
@end