Skip to content

Instantly share code, notes, and snippets.

HaifaCarina HaifaCarina

Block or report user

Report or block HaifaCarina

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@HaifaCarina
HaifaCarina / LocalHTMLApp.m
Created Dec 1, 2012
UIWebView implementation that loads content from from a local html file in the Xcode project.
View LocalHTMLApp.m
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)];
webView.autoresizesSubviews = YES;
webView.autoresizingMask=(UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth);
webView.dataDetectorTypes = UIDataDetectorTypeLink;
webView.backgroundColor = [UIColor redColor];
NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html" inDirectory:@"www"]];
[webView loadRequest:[NSURLRequest requestWithURL:url]];
[self.view addSubview:webView];
You can’t perform that action at this time.