Develop
2015.02.10 18:01
[ios] 로컬에 있는 html 실행하기
Views 1137 Comment 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
No. | Category | Subject | Author | Date | Views |
---|---|---|---|---|---|
709 | Develop | Laravel 5 Failed opening required bootstrap/../vendor/autoload.php | hooni | 2018.01.24 | 1826 |
708 | Develop | [php] mysql_ 과 mysqli_ 의 차이 | hooni | 2017.12.01 | 1838 |
707 | Develop | [ios] Xcode cannot run using the selected device | hooni | 2014.08.14 | 1913 |
706 | Develop | [ios] 카메라 사용 권한 확인해서 분기하는 방법 | hooni | 2015.02.26 | 1953 |
705 | Develop | [iOS] Xcode 불필요한 캐시 삭제하기 | hooni | 2021.10.12 | 1966 |
704 | Develop | [ios] Objective-C 에서 자주 사용하는 수학 함수와 유용한 Define | hooni | 2014.08.08 | 1985 |
703 | Develop | [iOS] 시뮬레이터에 푸시 알림을 보내는 방법 | hooni | 2021.10.13 | 1995 |
702 | Develop | [android] 가속도 센서를 이용한 흔듦(Shake) 감지 | hooni | 2014.11.04 | 1997 |
701 | Develop | [swift] UIView에서 subview 찾기 | hooni | 2022.12.09 | 2021 |
700 | Develop | [ios] 웹뷰 history.back() ㅋㄷ | hooni | 2016.06.27 | 2024 |
699 | Develop | [c#] mfc 기반의 웹서비스 서버/클라이언트 샘플과 예제 소스 | hooni | 2013.04.23 | 2073 |
698 | Develop | [c#] MS IE(Internet Explorer) 툴바 버튼 예제 2003/2005 두가지 버전 | hooni | 2013.04.23 | 2090 |