Develop
2015.02.10 18:01
[ios] 로컬에 있는 html 실행하기
Views 1144 Comment 0
HTML 파일을 리소스로 두고 웹뷰에서 읽어서 로드하기.
// Load the html as a string from the file system NSString *path = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"]; NSString *html = [[NSString alloc] initWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil]; // Tell the web view to load it [WebView loadHTMLString:html baseURL:[[NSBundle mainBundle] bundleURL]];
[출처] http://stackoverflow.com/questions/4645414/how-can-i-load-a-local-html-file-into-the-uiwebview
No. | Category | Subject | Author | Date | Views |
---|---|---|---|---|---|
337 | Develop | [html] 메타태그 사용예.. 은지나 바라~ | hooni | 2003.04.23 | 7255 |
336 | Develop | [c] 단기과정[01/17] 후위연산 스택 계산기.. | hooni | 2003.04.23 | 7255 |
335 | Develop | [c] 심심해서.. fseek() 예제.. | hooni | 2003.04.23 | 7254 |
334 | Develop | [js] 네이버에서 그림 퍼올 때.. URL Encoding 관련ㅋㅋ | hooni | 2013.04.23 | 7246 |
333 | Develop | [jsp] 초간단한 include 구문 예제.. | hooni | 2013.04.23 | 7245 |
332 | Develop | [c] 문자열 라이브러리 최신버전 | hooni | 2003.04.23 | 7222 |
331 | Develop | [c] 네트워크 관련 프로그래밍 (포트스캔 탐지 샘플) | hooni | 2013.04.23 | 7218 |
330 | Develop | [c] 함수 목록과 예제 소스 파일 | hooni | 2013.04.23 | 7211 |
329 | Develop | [c++] template 사용예 | hooni | 2003.04.23 | 7206 |
328 | Develop | [c] 시스템 보안 과제.. 시간(amc time) 변경 | hooni | 2013.04.23 | 7204 |
327 | Develop | [c] 시스템공학 레포트 (pass1, pass2) | hooni | 2003.04.23 | 7203 |
326 | Develop | [php] 탐색기와 같은 다이나믹 트리(xml/xsl 이용) | hooni | 2013.04.23 | 7203 |