Skip to content
Newer
Older
100644 60 lines (41 sloc) 1.46 KB
4664d37 @danielctull Added the License Agreement.
authored
1 //
2 // DTLicenseAgreementViewController.m
3 // DTKit
4 //
5 // Created by Daniel Tull on 25.04.2009.
6 // Copyright 2009 Daniel Tull. All rights reserved.
7 //
8
9 #import "DTLicenseAgreementViewController.h"
10
11
12 @implementation DTLicenseAgreementViewController
13
14 @synthesize webView;
15
16 - (id)init {
17 if (!(self = [self initWithNibName:@"DTLicenseAgreementView" bundle:nil]))
18 return nil;
19
20 self.title = @"Source License";
21
22 return self;
23 }
24
25 /*
26 // Implement loadView to create a view hierarchy programmatically, without using a nib.
27 - (void)loadView {
28 }
29 */
30
31
32 // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
33 - (void)viewDidLoad {
34 [super viewDidLoad];
35 NSString *webString = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"license" ofType:@"html"] encoding:NSUTF8StringEncoding error:NULL];
36 [self.webView loadHTMLString:webString baseURL:nil];
37 }
38
39
40
41 // Override to allow orientations other than the default portrait orientation.
42 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
43 // Return YES for supported orientations
44 return YES; //(interfaceOrientation == UIInterfaceOrientationPortrait);
45 }
46
47 - (void)didReceiveMemoryWarning {
48 [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
49 // Release anything that's not essential, such as cached data
50 }
51
52
53 - (void)dealloc {
54 [webView release]; webView = nil;
55 [super dealloc];
56 }
57
58
59 @end
Something went wrong with that request. Please try again.