-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathIntroductionViewController.m
45 lines (35 loc) · 1.37 KB
/
IntroductionViewController.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
#import "IntroductionViewController.h"
#import "PreviewViewController.h"
@interface IntroductionViewController ()
@end
@implementation IntroductionViewController
@synthesize trendsWebView;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad {
[super viewDidLoad];
NSString *htmlBundle = [[NSBundle mainBundle] pathForResource:@"trends" ofType:@"html"];
[trendsWebView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:htmlBundle isDirectory:NO]]];
}
- (IBAction)faq:(UIButton *)button {
[self performSegueWithIdentifier:@"intro-to-preview" sender:@"http://martinfowler.com/articles/radar-faq.html"];
}
- (IBAction)radar:(UIButton *)button {
[self performSegueWithIdentifier:@"intro-to-preview" sender:@"http://www.thoughtworks.com/radar"];
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(NSString *)url {
if ([segue.identifier isEqualToString:@"intro-to-preview"]) {
PreviewViewController *controller = (PreviewViewController *) segue.destinationViewController;
controller.url = url;
}
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end