Develop
2015.02.10 18:01
[ios] 로컬에 있는 html 실행하기
조회 수 1130 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
393 | Develop | [c++] 기초강좌 #03(함수의 매개변수 전달) | hooni | 2003.04.23 | 12127 |
392 | System/OS | [linux] /etc/fstab 설정 방법.. ㅋㅋ | hooni | 2013.04.23 | 12140 |
391 | Develop | [ios] GCD 변수 사용 예제 | hooni | 2013.10.01 | 12146 |
390 | Develop | 참고하고 지울 자료.. 집에서 바야지.. ㅋㅋ | hooni | 2013.04.23 | 12157 |
389 | Database | [oracle] SQL문 실행 방법 3가지 | hooni | 2013.12.19 | 12177 |
388 | System/OS | [linux] 데스크탑환경(GNOME/KDE) 바꾸기.. | hooni | 2003.04.23 | 12184 |
387 | PPT | [doc] 정보보호학술대회 논문지 ㅋㅋ | hooni | 2013.04.23 | 12190 |
386 | Develop | [c] 문자열 자르는 함수(strtok) 예제 | hooni | 2013.04.23 | 12196 |
385 | Develop | SVN 명령어 (SVN command) | hooni | 2014.02.28 | 12196 |
384 | Database | [mysql] DB->Text, Text->DB 변환 | hooni | 2003.04.23 | 12205 |
383 | System/OS | [linux] 파일내 문자열 찾아 바꾸기 | hooni | 2013.04.23 | 12257 |
382 | Develop | [php] 하루 전 날짜 쉽게 구하기. | hooni | 2013.12.25 | 12266 |