Contents

Develop
2015.02.10 18:01

[ios] 로컬에 있는 html 실행하기

조회 수 2190 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

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


?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
1057 Develop [vb] 비주얼 베이직 자격증용 ㅎㅎ hooni 2003.04.23 68521
1056 Develop [vb] 비주얼 베이직 순위 정렬 루틴 hooni 2003.04.23 66298
1055 Develop [vb] 비주얼 베이직 205페이지 hooni 2003.04.23 63367
1054 Develop [vb] 비주얼 베이직 173페이지 hooni 2003.04.23 62151
1053 Develop [vb] 비주얼 베이직 141페이지 hooni 2003.04.23 65839
1052 Develop [vb] 비주얼 베이직 131페이지 hooni 2003.04.23 65233
1051 Develop [vb] 문자열에서 태그 제거함수 (Visual Basic) file hooni 2013.04.23 25597
1050 Develop [vb] 64bit RSA 프로그램 소스 ㅋㅋ file hooni 2013.04.23 9200
1049 Develop [vbs] CD롬 뱉는 스크립트.. hooni 2003.04.23 12670
1048 Develop [unix] 유닉스 명령에 메타문자 사용 hooni 2014.02.19 12864
1047 System/OS [unix] 유닉스 csh에서 환경변수 등록 hooni 2003.04.23 12575
1046 Develop [unix] 쉘 스크립트 예제 모음 hooni 2003.04.23 17977
Board Pagination Prev 1 ... 6 7 8 9 10 11 12 13 14 15 ... 99 Next
/ 99