Contents

Develop
2015.02.10 18:01

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

조회 수 1037 댓글 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


?

  1. [ios] Objective-C에서 형식이 있는 문자열(Format Strings)에 사용할 수 있는 토큰들(Tokens)

  2. [ios] Objective-C 특정 문자 찾아 제거하기

  3. [ios] Objective-C 문자열 잘라서 배열(NSArray)에 넣기

  4. 러시아 페인트공 알고리즘에 대해..

  5. [Xcode] 디버깅 옵션

  6. 웹페이지 성능 테스트 툴 설명

  7. 맥북에서 MAC/윈도우 멀티부팅시 시간 설정

  8. [ios] 개발 기초 가이드 링크..

  9. 논문 실험용 고려대 툴바 ㅎㅎ

  10. [ios] NSMutableString 문자열 패턴 교환

  11. [iphone] view에 대한 조사 ㅡ,.ㅡ;

  12. [ios] 구분자로 문자열 자르기 (split)

Board Pagination Prev 1 ... 55 56 57 58 59 60 61 62 63 64 ... 98 Next
/ 98