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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
957 | Develop | [iOS] 시뮬레이터에 푸시 알림을 보내는 방법 | hooni | 2021.10.13 | 1830 |
956 | Database | SQL JOIN 정리 (Inner Join & Outer Join) | hooni | 2019.11.22 | 1842 |
955 | Develop | [ios] Objective-C 에서 자주 사용하는 수학 함수와 유용한 Define | hooni | 2014.08.08 | 1865 |
954 | Develop | [ios] 카메라 사용 권한 확인해서 분기하는 방법 | hooni | 2015.02.26 | 1875 |
953 | Develop | [php][laravel] 초간단 MacOS에서 Laravel 개발 환경 구축 | hooni | 2017.12.15 | 1886 |
952 | Develop | [android] 가속도 센서를 이용한 흔듦(Shake) 감지 | hooni | 2014.11.04 | 1898 |
951 | Develop | [ios] 웹뷰 history.back() ㅋㄷ | hooni | 2016.06.27 | 1905 |
950 | System/OS | 맥 OS X 에서 스크린 화면 캡쳐 단축키 (Mac Print Screen) | hooni | 2015.07.21 | 1907 |
949 | System/OS | iptime 공유기 해킹 기술문서 4 | hooni | 2015.01.01 | 1941 |
948 | Etc | 영어. 반드시 외워야 할 단어 | hooni | 2016.07.07 | 1977 |
947 | Develop | [matlab] ZigZag-Scanning (2-D Array) | hooni | 2016.10.15 | 1994 |
946 | Develop | [ios] 카테고리 확장 메소드를 찾지 못하는 경우 | hooni | 2014.08.08 | 2001 |