-
Notifications
You must be signed in to change notification settings - Fork 502
Expand file tree
/
Copy pathViewController.m
More file actions
36 lines (26 loc) · 1021 Bytes
/
ViewController.m
File metadata and controls
36 lines (26 loc) · 1021 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
//
// RootViewController.m
// SVWebViewController
//
// Created by Sam Vermette on 21.02.11.
// Copyright 2011 Sam Vermette. All rights reserved.
//
#import "ViewController.h"
#import "SVWebViewController.h"
#import "SVModalWebViewController.h"
@implementation ViewController
- (void)pushWebViewController {
NSURL *URL = [NSURL URLWithString:@"https://archive.org"];
SVWebViewController *webViewController = [[SVWebViewController alloc] initWithURL:URL];
[self.navigationController pushViewController:webViewController animated:YES];
}
- (void)presentWebViewController {
NSURL *URL = [NSURL URLWithString:@"https://archive.org"];
SVModalWebViewController *webViewController = [[SVModalWebViewController alloc] initWithURL:URL];
webViewController.modalPresentationStyle = UIModalPresentationPageSheet;
[self presentViewController:webViewController animated:YES completion:NULL];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
@end