Develop
2015.02.10 18:01
[ios] 로컬에 있는 html 실행하기
조회 수 1037 댓글 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 | [js] 점점 커지는 새창.. | hooni | 2003.04.23 | 6998 |
392 | Develop | [php] 메모장 - 웅지학원 ([c] mysql 백업프로그램 포함) | hooni | 2003.04.23 | 6993 |
391 | Develop | 도메인 관련 솔루션 분석할 거.. ㅋㄷ | hooni | 2013.04.23 | 6984 |
390 | Develop | [c++] 템플릿(Template) 예제 소스.. | hooni | 2013.04.23 | 6983 |
389 | Develop | [c] 소켓 프로그래밍 요약.. | hooni | 2003.04.23 | 6973 |
388 | Develop | [web] 웹 연동 프로그램 모음.. | hooni | 2013.04.23 | 6961 |
387 | Develop | [c++] 트리컨트롤 스텝 2 예제.. | hooni | 2013.04.23 | 6960 |
386 | Develop | [c] 단기과정[01/24] 정렬 알고리즘 | hooni | 2003.04.23 | 6955 |
385 | Develop | [c] 패킷 에널라이저 예제 소스(성안당) | hooni | 2013.04.23 | 6949 |
384 | Develop | 라이브러리에 대한 설명 (static & dynamic library) | hooni | 2013.04.23 | 6947 |
383 | Develop | [js] 네이버, 다음의 플레이어 스킨 | hooni | 2013.04.23 | 6943 |
382 | Develop | [js] php의 number_format() 함수와 같은.. ㅋㅋ | hooni | 2013.04.23 | 6939 |