Develop
2015.02.10 18:01
[ios] 로컬에 있는 html 실행하기
조회 수 1026 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
957 | Develop | [c] alarm()함수 설명과 간단한 예제 | hooni | 2013.04.23 | 6678 |
956 | Develop | [c] CGI Library to C^^ | hooni | 2003.04.23 | 8421 |
955 | Develop | [c] C로 구현한 CGI - 계산기 (링크리스트, 스택, 이진트리) | hooni | 2003.04.23 | 28083 |
954 | Develop | [c] C로 구현한 CGI - 달력과 날짜계산기 | hooni | 2003.04.23 | 32295 |
953 | Develop | [c] C로 구현한 CGI - 방명록 | hooni | 2003.04.23 | 33433 |
952 | Develop | [C] C언어의 조건 연산자(Conditional Operator) | hooni | 2003.04.23 | 14227 |
951 | Develop | [c] C에서 MySQL DB 사용하기~ | hooni | 2003.04.23 | 7011 |
950 | Develop | [c] fgets() 함수 사용하기.. | hooni | 2003.04.23 | 7818 |
949 | Develop | [c] flooding 알고리즘 미로 찾기(도스용) 소스코드 9 | hooni | 2003.04.23 | 12495 |
948 | Develop | [c] fork() 시스템 콜 사용 방법. | hooni | 2003.04.23 | 27581 |
947 | Develop | [c] FSN 온라인 코딩 테스트 (Sorting, Binary Search) | hooni | 2015.06.26 | 1011 |
946 | Develop | [c] GD라이브러리 설치 테스트 소스 | hooni | 2013.04.23 | 8143 |