Develop
2015.02.10 18:01
[ios] 로컬에 있는 html 실행하기
조회 수 2193 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
733 | Develop |
[js] 양원님이 공유해 주신 유료(5$란다ㅋ) 자료 ㅋㅋ
![]() |
hooni | 2013.04.23 | 7948 |
732 | Develop | [js] 실행되는 디렉토리 확인하는 스크립트.. | hooni | 2013.04.23 | 7439 |
731 | Develop |
[js] 스타크래프트(starcraft)..
![]() |
hooni | 2013.04.23 | 7947 |
730 | Develop | [js] 스크롤을 포함한 마우스 위치 찾는 코드 | hooni | 2003.04.23 | 9727 |
729 | Develop | [js] 스크롤 이벤트 막기 | hooni | 2015.04.14 | 2077 |
728 | Develop | [js] 숫자만 입력하게 하는 자바스크립트 | hooni | 2013.04.23 | 7973 |
727 | Develop |
[js] 순환참조에 의한 메모리 누수 관련
![]() |
hooni | 2013.12.17 | 11673 |
726 | Develop | [js] 수학 공식을 제공하는 Math 객체 | hooni | 2013.04.23 | 16363 |
725 | Develop |
[js] 수명체크 프로그램 ㅋㅋ
![]() |
hooni | 2013.04.23 | 7822 |
724 | Develop |
[js] 셀렉트박스(select)의 옵션(option) 동적으로 추가/제거
![]() |
hooni | 2013.04.23 | 9230 |
723 | Develop | [js] 서서히 나타나는 화면.. ㅋㅋ | hooni | 2013.04.23 | 7186 |
722 | Develop | [js] 새로고침(refresh)방법과 다른 페이지 바꾸기.. | hooni | 2003.04.23 | 7606 |