Skip to content

Commit

Permalink
marcuswestin#74 Not possible to load external javascript in ExampleAp…
Browse files Browse the repository at this point in the history
…p.html
  • Loading branch information
kanflo committed Mar 29, 2014
1 parent 47d9a9a commit 92d4715
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Example Apps/ExampleApp-iOS/ExampleAppViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ - (void)callHandler:(id)sender {
- (void)loadExamplePage:(UIWebView*)webView {
NSString* htmlPath = [[NSBundle mainBundle] pathForResource:@"ExampleApp" ofType:@"html"];
NSString* appHtml = [NSString stringWithContentsOfFile:htmlPath encoding:NSUTF8StringEncoding error:nil];
[webView loadHTMLString:appHtml baseURL:nil];
NSURL *baseURL = [NSURL fileURLWithPath:htmlPath];
[webView loadHTMLString:appHtml baseURL:baseURL];
}
@end

0 comments on commit 92d4715

Please sign in to comment.