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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
145 | Develop | [ios] 카테고리 확장 메소드를 찾지 못하는 경우 | hooni | 2014.08.08 | 2001 |
144 | Develop | [matlab] ZigZag-Scanning (2-D Array) | hooni | 2016.10.15 | 1994 |
143 | Develop | [ios] 웹뷰 history.back() ㅋㄷ | hooni | 2016.06.27 | 1908 |
142 | Develop | [android] 가속도 센서를 이용한 흔듦(Shake) 감지 | hooni | 2014.11.04 | 1898 |
141 | Develop | [php][laravel] 초간단 MacOS에서 Laravel 개발 환경 구축 | hooni | 2017.12.15 | 1886 |
140 | Develop | [ios] 카메라 사용 권한 확인해서 분기하는 방법 | hooni | 2015.02.26 | 1875 |
139 | Develop | [ios] Objective-C 에서 자주 사용하는 수학 함수와 유용한 Define | hooni | 2014.08.08 | 1865 |
138 | Develop | [iOS] 시뮬레이터에 푸시 알림을 보내는 방법 | hooni | 2021.10.13 | 1832 |
137 | Develop | [iOS] Xcode 불필요한 캐시 삭제하기 | hooni | 2021.10.12 | 1805 |
136 | Develop | [ios] Xcode cannot run using the selected device | hooni | 2014.08.14 | 1796 |
135 | Develop | [swift] UIView에서 subview 찾기 | hooni | 2022.12.09 | 1796 |
134 | Develop | [php] mysql_ 과 mysqli_ 의 차이 | hooni | 2017.12.01 | 1697 |