-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPSRDetailViewController.m
More file actions
43 lines (29 loc) · 978 Bytes
/
PSRDetailViewController.m
File metadata and controls
43 lines (29 loc) · 978 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
40
41
42
43
//
// PSRDetailViewController.m
// SimpleNotes
//
// Created by Daniil Korotin on 24.04.14.
// Copyright (c) 2014 Daniil Korotin. All rights reserved.
//
#import "PSRDetailViewController.h"
@interface PSRDetailViewController ()
@end
@implementation PSRDetailViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
self.textView = [[UITextView alloc] initWithFrame:self.view.bounds];
[self.view addSubview:self.textView];
if (self.note) {
self.textView.text = self.note.text;
}
self.navigationItem.title = self.note.text;
UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(cancel)];
self.navigationItem.rightBarButtonItem = cancelButton;
}
- (void)cancel {
}
- (void)viewWillDisappear:(BOOL)animated {
self.note.text = self.textView.text;
}
@end