-
Notifications
You must be signed in to change notification settings - Fork 502
Expand file tree
/
Copy pathViewController.m
More file actions
41 lines (30 loc) · 1.26 KB
/
ViewController.m
File metadata and controls
41 lines (30 loc) · 1.26 KB
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
//
// RootViewController.m
// SVWebViewController
//
// Created by Sam Vermette on 21.02.11.
// Copyright 2011 Sam Vermette. All rights reserved.
//
#import "ViewController.h"
#import "SVWebViewController.h"
@implementation ViewController
- (void)pushWebViewController {
NSURL *URL = [NSURL URLWithString:@"http://samvermette.com"];
SVWebViewController *webViewController = [[SVWebViewController alloc] initWithURL:URL];
[self.navigationController pushViewController:webViewController animated:YES];
}
- (void)presentWebViewController {
NSURL *URL = [NSURL URLWithString:@"http://samvermette.com"];
SVModalWebViewController *webViewController = [[SVModalWebViewController alloc] initWithURL:URL];
webViewController.modalPresentationStyle = UIModalPresentationPageSheet;
[self presentViewController:webViewController animated:YES completion:NULL];
}
- (IBAction)openPdf:(id)sender {
NSURL *URL = [NSURL URLWithString:@"http://stlab.adobe.com/wiki/images/d/d3/Test.pdf"];
SVWebViewController *webViewController = [[SVWebViewController alloc] initWithURL:URL];
[self.navigationController pushViewController:webViewController animated:YES];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
@end