Develop
2015.02.10 18:01
[ios] 로컬에 있는 html 실행하기
조회 수 2276 댓글 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
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
|---|---|---|---|---|---|
| 699 | Develop | [ios] 로컬에 있는 JS 파일 웹뷰에서 동적으로 실행하기 | hooni | 2015.02.10 | 2282 |
| » | Develop | [ios] 로컬에 있는 html 실행하기 | hooni | 2015.02.10 | 2276 |
| 697 | Develop | [ios] 앱의 로컬 js 파일에서 해당 프로젝트의 이미지 불러오기 | hooni | 2015.02.10 | 1625 |
| 696 | Develop | [ios] 문자열로 함수 실행하기 (eval 함수처럼) | hooni | 2015.02.10 | 1922 |
| 695 | Develop | [ios] URL 랜딩 속도(OpenURL 10초 정지되는) 이슈 | hooni | 2015.02.09 | 1887 |
| 694 | Develop |
[js] 2048 예쁘게 만들고 있는거.. ㅋㄷ
|
hooni | 2015.01.30 | 0 |
| 693 | Develop |
[php] XE 스킨에서 특정 도메인 리다이렉션
|
hooni | 2015.01.28 | 1603 |
| 692 | Develop |
[php] XE에서 도메인 별로 광고 다르게 적용하기
|
hooni | 2015.01.28 | 1628 |
| 691 | Develop |
[maven] Mac OS에 메이븐(maven) 설치하기
|
hooni | 2015.01.21 | 2229 |
| 690 | Develop |
[ios] iOS 앱 아이콘을 만드는 유틸
|
hooni | 2015.01.03 | 2441 |
| 689 | Develop |
[ios] Xcode의 디버그 모드에서 콜스택
|
hooni | 2015.01.03 | 2278 |
| 688 | Develop |
[ios] binary를 C코드로 변환
|
hooni | 2015.01.03 | 3313 |