Develop
2015.02.10 18:01
[ios] 로컬에 있는 html 실행하기
조회 수 2191 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
279 | Develop | [c++] 인라인 함수에 대한 설명 | hooni | 2013.04.23 | 8141 |
278 | Develop |
[php] 초간단 웹 카운터..
![]() |
hooni | 2003.04.23 | 8129 |
277 | Develop |
[c] 컴파일러 선행처리기 따라하기..
![]() |
hooni | 2003.04.23 | 8128 |
276 | Develop |
[pdf] C++ 국제 표준 문서
![]() |
hooni | 2013.04.23 | 8126 |
275 | Develop |
[c] 문자열 컨트롤 함수로 만든 프로그램들..
![]() |
hooni | 2003.04.23 | 8118 |
274 | Develop |
[c] 웹 메모장.. ㅋㅋ
![]() |
hooni | 2013.04.23 | 8116 |
273 | Develop |
[c++] 인라인 함수 설명과 예제..
![]() |
hooni | 2013.04.23 | 8097 |
272 | Develop | [c] 파일(int fd)에서 개행문자 단위로 읽기 by 후리자 | hooni | 2013.04.23 | 8087 |
271 | Develop |
[c] 단기과정[01/15] 피보나치, 파스칼.. 링크리스트
![]() |
hooni | 2003.04.23 | 8080 |
270 | Develop |
[php] 탐색기와 같은 다이나믹 트리(xml/xsl 이용)
![]() |
hooni | 2013.04.23 | 8078 |
269 | Develop |
[c] 학교 건물 최단거리 찾는 웹 연동 프로그램
![]() |
hooni | 2013.04.23 | 8075 |
268 | Develop |
[c] pcapdump 파일 분석 하는 프로그램.. ㅋㅋ
![]() |
hooni | 2013.04.23 | 8060 |