Develop
2015.02.10 18:01
[ios] 로컬에 있는 html 실행하기
조회 수 2181 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
327 | Develop |
[android] 만화 어플 소스코드
![]() |
hooni | 2013.04.23 | 96718 |
326 | Develop |
[c#] 웹문서 소스(html) 긁어오기
![]() |
hooni | 2013.04.23 | 26584 |
325 | Develop | [C#] MD5, SHA1 해시 & 인코딩 | hooni | 2013.04.23 | 80939 |
324 | Develop | [spring] 스프링 IoC/DI | hooni | 2013.04.23 | 12384 |
323 | Develop | [java] Interface 와 abstract | hooni | 2013.04.23 | 11273 |
322 | Develop | [ios] 코코아 프레임워크(Cocoa Framework) 기본적인 내용~ | hooni | 2013.04.23 | 28953 |
321 | Develop | [ios] 참고할만한 좋은 예제 소스.. | hooni | 2013.04.23 | 28170 |
320 | Develop | [js] 수학 공식을 제공하는 Math 객체 | hooni | 2013.04.23 | 16361 |
319 | Develop | [js] 간단한 게임 프로토타입 (HTML5 와는 무관) | hooni | 2013.04.23 | 16354 |
318 | Develop |
[android] 자동차 리모컨 소스코드
![]() |
hooni | 2013.04.23 | 17082 |
317 | Develop | [android] [번역] 안드로이드 Android Cloud to Device Messaging(C2DM) | hooni | 2013.04.23 | 22610 |
316 | Develop | [ios] Objective-C 문자열 조작 메서드 | hooni | 2013.04.23 | 27804 |