Develop
2015.02.10 18:01
[ios] 로컬에 있는 html 실행하기
조회 수 1035 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
337 | Develop | [c] 단기과정[01/17] 후위연산 스택 계산기.. | hooni | 2003.04.23 | 7226 |
336 | Develop | [js] 네이버에서 그림 퍼올 때.. URL Encoding 관련ㅋㅋ | hooni | 2013.04.23 | 7225 |
335 | Develop | [c] 단기과정[01/08] 배열, 포인터 | hooni | 2003.04.23 | 7223 |
334 | Develop | [php] 웹 터미널 & 업로드 소스.. | hooni | 2013.04.23 | 7223 |
333 | Develop | [c] 네트워크 관련 프로그래밍 (포트스캔 탐지 샘플) | hooni | 2013.04.23 | 7199 |
332 | Develop | [c] 시스템 보안 과제.. 시간(amc time) 변경 | hooni | 2013.04.23 | 7194 |
331 | Develop | [c] 함수 목록과 예제 소스 파일 | hooni | 2013.04.23 | 7194 |
330 | Develop | [c] 문자열 라이브러리 최신버전 | hooni | 2003.04.23 | 7188 |
329 | Develop | [c] 연산자 우선순위.. ㅋㅋ | hooni | 2013.04.23 | 7185 |
328 | Develop | [c] 시스템공학 레포트 (pass1, pass2) | hooni | 2003.04.23 | 7183 |
327 | Develop | [c] 가변인자 함수(printf와 같은..) | hooni | 2013.04.23 | 7179 |
326 | Develop | [c++] 트리컨트롤 예제1 ㅋㅋ | hooni | 2013.04.23 | 7175 |