Created
February 22, 2015 17:06
-
-
Save terrybu/6ffd7b99544828e6a3d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <WebKit/WebKit.h> | |
@interface ViewController : UIViewController | |
@property(strong,nonatomic) WKWebView *webView; | |
@property (strong, nonatomic) NSString *productURL; @end | |
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
self.productURL = @"http://www.URL YOU WANT TO VIEW GOES HERE"; | |
NSURL *url = [NSURL URLWithString:self.productURL]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; | |
_webView = [[WKWebView alloc] initWithFrame:self.view.frame]; | |
[_webView loadRequest:request]; | |
_webView.frame = CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y, self.view.frame.size.width, self.view.frame.size.height); [self.view addSubview:_webView]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment