Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ViewController.h
- #import <UIKit/UIKit.h>
- @interface ViewController : UIViewController <UIWebViewDelegate>
- @property (weak, nonatomic) IBOutlet UIWebView *webView;
- @end
- // ViewController.m
- #import "ViewController.h"
- @interface ViewController ()
- @end
- @implementation ViewController
- - (void)viewDidLoad {
- {
- [super viewDidLoad];
- NSString *htmlFile = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html" inDirectory:@"LocalHTML"];
- NSURL *url = [NSURL fileURLWithPath:htmlFile];
- NSURLRequest *request = [NSURLRequest requestWithURL:url];
- [self.webView loadRequest:request];
- }
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement