Created
February 6, 2014 09:07
-
-
Save keicoder/8840784 to your computer and use it in GitHub Desktop.
objective-c : 웹 뷰 이용 로컬 html 파일 불러오기
This file contains hidden or 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
//웹 뷰 이용 로컬 html 파일 불러오기 | |
NSString *htmlFile = [[NSBundle mainBundle] | |
pathForResource:@"BullsEye" | |
ofType:@"html"]; | |
NSData *htmlData = [NSData dataWithContentsOfFile:htmlFile]; | |
NSURL *baseURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]]; | |
[self.webView loadData:htmlData MIMEType:@"text/html" textEncodingName:@"UTF-8" baseURL:baseURL]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment