forked from iimgal/StudyiOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCodeViewController.m
More file actions
42 lines (31 loc) · 796 Bytes
/
Copy pathCodeViewController.m
File metadata and controls
42 lines (31 loc) · 796 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
//
// CodeViewController.m
// StudyiOS
//
// Created by on 11-10-30.
// Copyright (c) 2011年 ZhangYiCheng. All rights reserved.
//
#import "CodeViewController.h"
@implementation CodeViewController
@synthesize className;
@synthesize textView;
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
}
#pragma mark - View lifecycle
- (void)viewDidLoad
{
self.navigationItem.title = @"Code";
NSString *path = [[NSBundle mainBundle] pathForResource:self.className ofType:@"x"];
NSString *kText = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
textView.text = kText;
[super viewDidLoad];
}
- (void)viewDidUnload
{
self.className = nil;
[self setTextView:nil];
[super viewDidUnload];
}
@end