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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
745 | Develop | [io] Apple Watch, Today Extension 앱ID 설정 | hooni | 2016.04.20 | 801 |
744 | Develop | [ios] Did UIScrollView End Scrolling? | hooni | 2016.04.19 | 1027 |
743 | Develop | [ios] How To Use UIScrollView to Scroll and Zoom Content (Using Swift) | hooni | 2016.03.23 | 7346 |
742 | Develop | [ios] How To Use UIScrollView to Scroll and Zoom Content (Using Objective-C) | hooni | 2016.03.23 | 1621 |
741 | Develop | [js] AngularJS 란? | hooni | 2015.11.26 | 895 |
740 | Develop | [php] 한글 문자열 자르기 (utf-8) | hooni | 2015.11.10 | 1324 |
739 | Develop | [c] 한글 문자열 출력 | hooni | 2015.11.10 | 1682 |
738 | Develop | [ios] NavigationController 에서 왼쪽(back) 버튼 후킹하기 | hooni | 2015.10.23 | 1188 |
737 | Develop | [ios] ViewController Push할 때 애니메이션 효과 | hooni | 2015.10.23 | 879 |
736 | Develop | [linux] CentOS Apache 웹서버에 HTTPS 적용 | hooni | 2015.10.23 | 790 |
735 | Develop | [c] 기막힌 정렬 코드 ㅋㄷ | hooni | 2015.10.13 | 814 |
734 | Develop | [ios] 상위 ViewController 가져오기 | hooni | 2015.10.12 | 960 |