Advertisement
Guest User

Untitled

a guest
Aug 25th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. // ViewController.h
  2.  
  3. #import <UIKit/UIKit.h>
  4.  
  5. @interface ViewController : UIViewController <UIWebViewDelegate>
  6. @property (weak, nonatomic) IBOutlet UIWebView *webView;
  7.  
  8. @end
  9.  
  10.  
  11. // ViewController.m
  12.  
  13. #import "ViewController.h"
  14.  
  15. @interface ViewController ()
  16.  
  17. @end
  18.  
  19. @implementation ViewController
  20.  
  21. - (void)viewDidLoad {
  22.  
  23. {
  24. [super viewDidLoad];
  25. NSString *htmlFile = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html" inDirectory:@"LocalHTML"];
  26. NSURL *url = [NSURL fileURLWithPath:htmlFile];
  27. NSURLRequest *request = [NSURLRequest requestWithURL:url];
  28.  
  29.  
  30. [self.webView loadRequest:request];
  31.  
  32. }
  33. }
  34.  
  35.  
  36. - (void)didReceiveMemoryWarning {
  37. [super didReceiveMemoryWarning];
  38. // Dispose of any resources that can be recreated.
  39. }
  40.  
  41. @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement