Develop
2015.02.10 18:01
[ios] 로컬에 있는 html 실행하기
Views 1138 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 |
---|---|---|---|---|---|
709 | Develop | [c++] 레지스트리 등록 예제 1 | hooni | 2013.04.23 | 8815 |
708 | Develop | [c++] 레지스트리 편집하는 부분..ㅡㅡ; | hooni | 2013.04.23 | 8298 |
707 | Develop | [c++] 링크리스트(linked list) 클래스(스택,큐) | hooni | 2003.04.23 | 9589 |
706 | Develop | [c++] 마방진 소스코드 | hooni | 2013.04.23 | 9569 |
705 | Develop | [c++] 문자열 뒤집기(문자열 거꾸로 출력) | hooni | 2013.04.23 | 17313 |
704 | Develop | [c++] 바탕화면 테두리에 자석처럼 붙는 스냅효과.. | hooni | 2013.04.23 | 8927 |
703 | Develop | [c++] 소켓 프로그래밍 관련 링크.. (퍼올려고 올린거) | hooni | 2013.04.23 | 7062 |
702 | Develop | [c++] 쓰레드(Thread) 객체의 사용 | hooni | 2013.04.23 | 8604 |
701 | Develop | [c++] 압축프로그램(Lite Zip) 샘플 | hooni | 2013.04.23 | 8629 |
700 | Develop | [c++] 웹폼(webform)전송과 http 파일 업로드 샘플 | hooni | 2013.04.23 | 33109 |
699 | Develop | [c++] 윈도우 API 정복 예제 | hooni | 2013.04.23 | 7633 |
698 | Develop | [c++] 윈도우 프로세스뷰어 분석.. ㅋㅋ | hooni | 2013.04.23 | 8861 |