-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDescriptionViewController.m
53 lines (41 loc) · 1.22 KB
/
DescriptionViewController.m
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
44
45
46
47
48
49
50
51
52
53
//
// DescriptionNavigationViewController.m
// Soundrocket
//
// Created by Sebastian Boldt on 30.09.15.
// Copyright © 2015 sebastianboldt. All rights reserved.
//
#import "DescriptionViewController.h"
@interface DescriptionViewController ()
@end
@implementation DescriptionViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.emptyView.text = NSLocalizedString(@"No Description", nil);
// Do any additional setup after loading the view.
if (_descriptionText.length > 0) {
self.emptyView.hidden = YES;
} else {
self.emptyView.hidden = NO;
}
self.descriptionTextView.text = _descriptionText;
}
-(void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
}
-(void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
NSRange r = {0,0};
[self.descriptionTextView setSelectedRange:r];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
-(IBAction)closeAction:(id)sender {
[self.navigationController dismissViewControllerAnimated:YES completion:nil];
}
-(void)setDescriptionText:(NSString *)descriptionText {
_descriptionText = descriptionText;
}
@end