Develop
2015.02.10 18:01
[ios] 로컬에 있는 html 실행하기
조회 수 1035 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
237 | Develop | [android] 안드로이드 앱 문서 샘플 | hooni | 2017.07.11 | 2111 |
236 | System/OS | 서버 확장을 위한 두 가지 방법 | hooni | 2018.08.29 | 2107 |
235 | Develop | [ios] 기본 네비게이션바의 타이틀, back버튼 위치와 속성 변경 | hooni | 2016.05.16 | 2095 |
234 | Develop | [c#] MS IE(Internet Explorer) 툴바 버튼 예제 2003/2005 두가지 버전 | hooni | 2013.04.23 | 2090 |
233 | Develop | [android] SQLiteOpenHelper를 이용한 DBManager | hooni | 2017.06.14 | 2076 |
232 | Develop | [c#] mfc 기반의 웹서비스 서버/클라이언트 샘플과 예제 소스 | hooni | 2013.04.23 | 2073 |
231 | Develop | [ios] 설정에서 푸시 알림(APNS) on/off 상태 확인 | hooni | 2015.04.28 | 2049 |
230 | Develop | [java] netty (비동기 이벤트 방식 네트워크 프레임워크) 사용법 #2 (client) | hooni | 2015.01.02 | 2045 |
229 | Develop | [ios] Swift 4 Dictionary 사용하기 | hooni | 2018.11.29 | 2031 |
228 | Develop | [ios] 카테고리 확장 메소드를 찾지 못하는 경우 | hooni | 2014.08.08 | 2000 |
227 | Develop | [matlab] ZigZag-Scanning (2-D Array) | hooni | 2016.10.15 | 1994 |
226 | Etc | 영어. 반드시 외워야 할 단어 | hooni | 2016.07.07 | 1977 |