Develop
2015.02.10 18:01

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

Views 1032 Votes 0 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

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
No. Category Subject Author Date Views
665 Develop [c] C로 구현한 CGI - 계산기 (링크리스트, 스택, 이진트리) file hooni 2003.04.23 28087
664 Develop [c] C로 구현한 CGI - 달력과 날짜계산기 file hooni 2003.04.23 32311
663 Develop [c] C로 구현한 CGI - 방명록 file hooni 2003.04.23 33437
662 Develop [C] C언어의 조건 연산자(Conditional Operator) hooni 2003.04.23 14227
661 Develop [c] C에서 MySQL DB 사용하기~ file hooni 2003.04.23 7011
660 Develop [c] fgets() 함수 사용하기.. hooni 2003.04.23 7819
659 Develop [c] flooding 알고리즘 미로 찾기(도스용) 소스코드 9 file hooni 2003.04.23 12509
658 Develop [c] fork() 시스템 콜 사용 방법. hooni 2003.04.23 27588
657 Develop [c] FSN 온라인 코딩 테스트 (Sorting, Binary Search) file hooni 2015.06.26 1011
656 Develop [c] GD라이브러리 설치 테스트 소스 file hooni 2013.04.23 8144
655 Develop [c] GD라이브러리(jpeg)를 사용한 웹 카운터 샘플 hooni 2013.04.23 15107
654 Develop [c] home env stack overflow hooni 2003.04.23 11515
653 Develop [c] i2osp 임시로.. ㅋㅋ file hooni 2003.04.23 7819
652 Develop [c] ICMP 패킷을 이용한 장난감 hooni 2003.04.23 17414
651 Develop [c] IP 스푸핑(ip spoof) 소스 - 정리해야 함 file hooni 2003.04.23 7545
650 Develop [c] kmp 활용 search file hooni 2013.04.23 7418
Board Pagination Prev 1 ... 10 11 12 13 14 ... 53 Next
/ 53