Develop
2015.02.10 18:01
[ios] 로컬에 있는 html 실행하기
조회 수 1041 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
769 | Develop | [c++] 기초강좌 #01(입출력,영역지정) | hooni | 2003.04.23 | 11417 |
768 | Develop | [c++] 기초강좌 #02(레퍼런스,메모리할당) | hooni | 2003.04.23 | 11439 |
767 | Develop | [c++] 기초강좌 #03(함수의 매개변수 전달) | hooni | 2003.04.23 | 12090 |
766 | Develop | [c++] 기초강좌 #04(클래스) | hooni | 2003.04.23 | 11841 |
765 | Develop | [c] C로 구현한 CGI - 방명록 | hooni | 2003.04.23 | 33447 |
764 | Develop | [c] C로 구현한 CGI - 계산기 (링크리스트, 스택, 이진트리) | hooni | 2003.04.23 | 28098 |
763 | Develop | [c] C로 구현한 CGI - 달력과 날짜계산기 | hooni | 2003.04.23 | 32349 |
762 | Develop | [jsp] 유효성체크(Client, Server 에서) | hooni | 2003.04.23 | 7428 |
761 | Develop | [js] 키보드 아스키 코드 확인하는 간단한 소스 | hooni | 2003.04.23 | 7758 |
760 | Develop | [js] 핫키(단축키) 구현방법 | hooni | 2003.04.23 | 7635 |
759 | Develop | [js] 이미지 미리 로딩하기 | hooni | 2003.04.23 | 7008 |
758 | Develop | [html] 캐쉬된 웹페이지 사용하지 않도록 하는 방법 | hooni | 2003.04.23 | 13032 |