Develop
2015.02.10 18:01
[ios] 로컬에 있는 html 실행하기
조회 수 1180 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
709 | Develop | [ios] Pod 특정 버전 설치하고 사용하기 | hooni | 2022.05.28 | 1891 |
708 | Develop | [php] mysql_ 과 mysqli_ 의 차이 | hooni | 2017.12.01 | 1892 |
707 | Develop | [ios] Xcode cannot run using the selected device | hooni | 2014.08.14 | 1941 |
706 | Develop | [ios] 카메라 사용 권한 확인해서 분기하는 방법 | hooni | 2015.02.26 | 1990 |
705 | Develop | [ios] Objective-C 에서 자주 사용하는 수학 함수와 유용한 Define | hooni | 2014.08.08 | 2020 |
704 | Develop | [android] 가속도 센서를 이용한 흔듦(Shake) 감지 | hooni | 2014.11.04 | 2037 |
703 | Develop | [iOS] Xcode 불필요한 캐시 삭제하기 | hooni | 2021.10.12 | 2068 |
702 | Develop | [c#] mfc 기반의 웹서비스 서버/클라이언트 샘플과 예제 소스 | hooni | 2013.04.23 | 2073 |
701 | Develop | [c#] MS IE(Internet Explorer) 툴바 버튼 예제 2003/2005 두가지 버전 | hooni | 2013.04.23 | 2090 |
700 | Develop | [iOS] 시뮬레이터에 푸시 알림을 보내는 방법 | hooni | 2021.10.13 | 2092 |
699 | Develop | [ios] 웹뷰 history.back() ㅋㄷ | hooni | 2016.06.27 | 2094 |
698 | Develop | [c#] 툴바 최근 버전(IE6, IE7 두가지 버전) | hooni | 2013.04.23 | 2138 |